diff options
author | Tim Biermann <tbier@posteo.de> | 2021-08-11 07:58:03 +0200 |
---|---|---|
committer | Tim Biermann <tbier@posteo.de> | 2021-08-11 07:59:54 +0200 |
commit | 4cf294fdc1ff2dcb8205326827cd4c9b48167725 (patch) | |
tree | 68b1040e6b1fc0be591a1ad8a43abf3bc8c9e91f /libqrcodegen/cpp-makefile.patch | |
parent | 1ed0255b3961c93ef190b111a2ffdcc4d2a5312d (diff) | |
download | contrib-4cf294fdc1ff2dcb8205326827cd4c9b48167725.tar.gz contrib-4cf294fdc1ff2dcb8205326827cd4c9b48167725.tar.xz |
libqrcodegen: 1.6.0 -> 1.7.0
Diffstat (limited to 'libqrcodegen/cpp-makefile.patch')
-rw-r--r-- | libqrcodegen/cpp-makefile.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/libqrcodegen/cpp-makefile.patch b/libqrcodegen/cpp-makefile.patch new file mode 100644 index 000000000..a708ec86d --- /dev/null +++ b/libqrcodegen/cpp-makefile.patch @@ -0,0 +1,95 @@ +--- cpp/Makefile.orig 2021-08-08 17:21:08 UTC ++++ cpp/Makefile +@@ -29,11 +29,13 @@ + # - CXXFLAGS: Any extra user-specified compiler flags (can be blank). + + # Recommended compiler flags: +-CXXFLAGS += -std=c++11 -O ++CXXFLAGS ?= -std=c++11 -O + + # Extra flags for diagnostics: + # CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address + ++# Version information ++VERSION = 1.7.0 + + # ---- Controlling make ---- + +@@ -51,29 +53,59 @@ CXXFLAGS += -std=c++11 -O + # ---- Targets to build ---- + + LIB = qrcodegencpp +-LIBFILE = lib$(LIB).a ++ARFILE = lib$(LIB).a ++LIBFILE = lib$(LIB).so ++# Bump the soname number when the ABI changes and gets incompatible ++SO_NAME = $(LIBFILE).1 ++REAL_NAME = $(LIBFILE).$(VERSION) ++HEADERS = qrcodegen.hpp + LIBOBJ = qrcodegen.o + MAINS = QrCodeGeneratorDemo + ++# define paths to install ++INCLUDEDIR ?= $(DESTDIR)$(PREFIX)/include/qrcodegen ++LIBDIR ?= $(DESTDIR)$(PREFIX)/lib ++ + # Build all binaries +-all: $(LIBFILE) $(MAINS) ++all: $(LIBFILE) $(ARFILE) $(MAINS) + + # Delete build output + clean: +- rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS) ++ rm -f -- $(LIBOBJ) $(LIBFILE) $(ARFILE) $(MAINS:=.o) $(MAINS) + rm -rf .deps + ++install-shared: $(LIBFILE) ++ install -d $(LIBDIR) || true ++ install -m 0644 $(LIBFILE) $(LIBDIR)/$(REAL_NAME) ++ rm -f $(LIBDIR)/$(SO_NAME) ++ ln -s $(REAL_NAME) $(LIBDIR)/$(SO_NAME) ++ rm -f $(LIBDIR)/$(LIBFILE) ++ ln -s $(SO_NAME) $(LIBDIR)/$(LIBFILE) ++ ++install-static: $(ARFILE) ++ install -d $(LIBDIR) || true ++ install -m 0644 $(ARFILE) $(LIBDIR)/$(ARFILE) ++ ++install-header: $(HEADERS) ++ install -d $(INCLUDEDIR) || true ++ install -m 0644 $(HEADERS) $(INCLUDEDIR)/ ++ ++install: install-shared install-static install-header ++ + # Executable files + %: %.o $(LIBFILE) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< -L . -l $(LIB) + + # The library +-$(LIBFILE): $(LIBOBJ) ++$(ARFILE): $(LIBOBJ) + $(AR) -crs $@ -- $^ + ++$(LIBFILE): $(LIBOBJ) ++ $(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $@ $^ ++ + # Object files + %.o: %.cpp .deps/timestamp +- $(CXX) $(CXXFLAGS) -c -o $@ -MMD -MF .deps/$*.d $< ++ $(CXX) $(CXXFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $< + + # Have a place to store header dependencies automatically generated by compiler + .deps/timestamp: + + +[FILE:142:files/Makefile] +SUBDIRS= c cpp + +TARGETS= all clean install + +.PHONY: $(TARGETS) $(SUBDIRS) + +$(TARGETS): $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) |