From 84b01a5de3a940d3d6dff2692234a229d6119625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sun, 8 Jan 2023 21:12:38 +0100 Subject: [PATCH] Use system version of pugixml, not a checkouted one --- Makefile | 6 +++--- README.md | 1 + scripts/setup.sh | 8 -------- scripts/update_lib.sh | 7 +------ src/pugixml.cpp | 1 - utils/Makefile | 2 +- 6 files changed, 6 insertions(+), 19 deletions(-) delete mode 120000 src/pugixml.cpp diff --git a/Makefile b/Makefile index a962ba7..98b7aa4 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ endif UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a -CXXFLAGS += -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include -LDFLAGS = $(UPDFPARSERLIB) +CXXFLAGS += -Wall -fPIC -I./include -I./usr/include/pugixml -I./lib/updfparser/include +LDFLAGS = $(UPDFPARSERLIB) -lpugixml VERSION := $(shell cat include/libgourou.h |grep LIBGOUROU_VERSION|cut -d '"' -f2) @@ -48,7 +48,7 @@ TARGETDIR := bin SRCEXT := cpp OBJEXT := o -SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/loan_token.cpp src/bytearray.cpp src/pugixml.cpp +SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/loan_token.cpp src/bytearray.cpp OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT))) all: version lib obj $(TARGETS) diff --git a/README.md b/README.md index f11aed5..2f333e7 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ For utils : * libcurl * OpenSSL * libzip + * libpugixml Internal libraries are automatically fetched and statically compiled during the first run. diff --git a/scripts/setup.sh b/scripts/setup.sh index a3965f4..5c25ff9 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1,13 +1,5 @@ #!/bin/bash -# Pugixml -if [ ! -d lib/pugixml ] ; then - git clone https://github.com/zeux/pugixml.git lib/pugixml - pushd lib/pugixml - git checkout latest - popd -fi - # uPDFParser if [ ! -d lib/updfparser ] ; then git clone git://soutade.fr/updfparser.git lib/updfparser diff --git a/scripts/update_lib.sh b/scripts/update_lib.sh index 1605450..6c1ede0 100755 --- a/scripts/update_lib.sh +++ b/scripts/update_lib.sh @@ -1,17 +1,12 @@ #!/bin/bash -if [ ! -d lib/pugixml -o ! -d lib/updfparser ] ; then +if [ ! -d lib/updfparser ] ; then echo "Some libraries are missing" echo "You must run this script at the top of libgourou working direcotry." echo "./lib/setup.sh must be called first (make all)" exit 1 fi -# Pugixml -pushd lib/pugixml -git pull origin latest -popd - # uPDFParser pushd lib/updfparser git pull origin master diff --git a/src/pugixml.cpp b/src/pugixml.cpp deleted file mode 120000 index 5049a58..0000000 --- a/src/pugixml.cpp +++ /dev/null @@ -1 +0,0 @@ -../lib/pugixml/src/pugixml.cpp \ No newline at end of file diff --git a/utils/Makefile b/utils/Makefile index aa84e38..84ab81a 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -5,7 +5,7 @@ TARGETS=$(TARGET_BINARIES) launcher CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/ STATIC_DEP= -LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl +LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl -lpugixml ifneq ($(STATIC_UTILS),) STATIC_DEP = $(ROOT)/libgourou.a