From 48e3eff00ac95c2213c2b711db276e32724515a5 Mon Sep 17 00:00:00 2001 From: benny Date: Thu, 5 Dec 2024 10:39:36 +0200 Subject: [PATCH] Made build run on debian 12.9 --- GNUmakefile | 2 +- README.md | 12 ++++++------ Samba/source/pidl/pidl | 2 +- pyinclude.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 0f9fc6b..3d87165 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -28,7 +28,7 @@ PYTHON_EXISTS := $(wildcard $(PYTHON)) # ifeq ($(PYTHON_EXISTS),$(PYTHON)) PY_INCDIR = $(shell $(PYTHON) pyinclude.py) -GET_VERSION = "import version as v; print v.VERSION" +GET_VERSION = "import version as v; print(v.VERSION)" WMI_VERSION := $(shell cd pysamba ; $(PYTHON) -c $(GET_VERSION)) WMI_CPPFLAGS := -I$(PY_INCDIR) endif diff --git a/README.md b/README.md index d2b1ab0..68f940c 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ - In Samba/source/pidl/pidl line 583 I already removed the word defined before @$pidl ### How to Compile -- Tested on Debian 9 Stretch -- cd /usr/src/ -- apt-get install autoconf gcc libdatetime-perl make build-essential g++ python-dev -- git clone git@github.com:astbss/wmic.git -- cd /usr/src/wmic +- Tested on Debian 12.9 +- apt-get install autoconf gcc libdatetime-perl make build-essential g++ python3-dev +- git clone ssh://git@gitea.infra.internal.rndsoft.ro:2222/benishor/wmic.git +- cd wmic +- mkdir -p Samba/source/bin/static/ - make "CPP=gcc -E -ffreestanding", -- cp Samba/source/bin/wmic /usr/local/bin/ +- binary is to be found in Samba/source/bin/wmic ### How to Test it - **Get system information** diff --git a/Samba/source/pidl/pidl b/Samba/source/pidl/pidl index 8084213..59e467f 100755 --- a/Samba/source/pidl/pidl +++ b/Samba/source/pidl/pidl @@ -580,7 +580,7 @@ sub process_file($) require Parse::Pidl::IDL; $pidl = Parse::Pidl::IDL::parse_file($idl_file, \@opt_incdirs); - defined @$pidl || die "Failed to parse $idl_file"; + @$pidl || die "Failed to parse $idl_file"; require Parse::Pidl::Typelist; Parse::Pidl::Typelist::LoadIdl($pidl); } diff --git a/pyinclude.py b/pyinclude.py index a7f0222..818ba0c 100755 --- a/pyinclude.py +++ b/pyinclude.py @@ -14,5 +14,5 @@ import sys import os version = '.'.join(map(str, sys.version_info[:2])) -print os.path.join(sys.prefix, 'include', 'python' + version) +print(os.path.join(sys.prefix, 'include', 'python' + version))