From 4cf294fdc1ff2dcb8205326827cd4c9b48167725 Mon Sep 17 00:00:00 2001 From: Tim Biermann Date: Wed, 11 Aug 2021 07:58:03 +0200 Subject: [PATCH] libqrcodegen: 1.6.0 -> 1.7.0 --- libqrcodegen/.signature | 9 +- libqrcodegen/Pkgfile | 13 +- libqrcodegen/c-makefile.patch | 84 ++++++++++ libqrcodegen/cpp-makefile.patch | 95 ++++++++++++ .../qr-code-generator-build-fixes.patch | 143 ------------------ 5 files changed, 190 insertions(+), 154 deletions(-) create mode 100644 libqrcodegen/c-makefile.patch create mode 100644 libqrcodegen/cpp-makefile.patch delete mode 100644 libqrcodegen/qr-code-generator-build-fixes.patch diff --git a/libqrcodegen/.signature b/libqrcodegen/.signature index 5d5556446..8a1774033 100644 --- a/libqrcodegen/.signature +++ b/libqrcodegen/.signature @@ -1,6 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF34oVLmMVhEGJ0hJ18rmI19LMSfWFk6Orr0FPau7uQi2mjzvD/hbVj91vxxo9Av3wOc3AfmW8k9KZdYECAAuGdAA= -SHA256 (Pkgfile) = b2995392daba6cac52b258030e717b28e72a0490b041d12419432d63172d6e6c +RWSagIOpLGJF34+Ke2C79VjpGqIxthxpbjLYFZiOKhjLPGTWUKCQGNWC0tIjOqGwqTv33BOQ88/ovaYTMJ9ZtzotaOpQYBYSgAs= +SHA256 (Pkgfile) = 9f25fe999ac31627091f41753767f0c005c6330154f4148423d80e3a24c60285 SHA256 (.footprint) = 49cab9bb05830f1b5c591af844fdfd1056365aacfcee52bf65e5f24355c9a9ca -SHA256 (libqrcodegen-1.6.0.tar.gz) = 8acee5a77325e075b910747ad4b1fdb1491b7e22d0b8f1b5a6ea15ea08ba33a8 -SHA256 (qr-code-generator-build-fixes.patch) = 6ee12ffc7b0669f172eb79a37e4b394fd14877761b62bbaa7fa1011f9dd93e30 +SHA256 (libqrcodegen-1.7.0.tar.gz) = a8138d84a2adbc9168bfadfb9db5272c89b69fb87f72a88ecd08ce7f402ee710 +SHA256 (cpp-makefile.patch) = d243b287dc16df521d5a1bf4606bc024bef5e6a0a214592bb682ffc9215ce52c +SHA256 (c-makefile.patch) = 9f3e752f6bbe2f6a10e0905dd76665bfd6e33db9b24ab496d69addd4d658410f diff --git a/libqrcodegen/Pkgfile b/libqrcodegen/Pkgfile index e29857d91..cce16024d 100644 --- a/libqrcodegen/Pkgfile +++ b/libqrcodegen/Pkgfile @@ -1,20 +1,19 @@ # Description: QR code generator # URL: https://github.com/nayuki/QR-Code-generator # Maintainer: Tim Biermann, tbier at posteo dot de -# Depends on: name=libqrcodegen -version=1.6.0 +version=1.7.0 release=1 source=(https://github.com/nayuki/QR-Code-generator/archive/v$version/$name-$version.tar.gz - qr-code-generator-build-fixes.patch) + cpp-makefile.patch c-makefile.patch) build() { - # https://raw.githubusercontent.com/OpenMandrivaAssociation/qr-code-generator/master/qr-code-generator-build-fixes.patch - patch -Np1 -d QR-Code-generator-$version -i $SRC/qr-code-generator-build-fixes.patch + patch -Np1 -d QR-Code-generator-$version/c -i $SRC/c-makefile.patch + patch -Np1 -d QR-Code-generator-$version/cpp -i $SRC/cpp-makefile.patch cp -R QR-Code-generator-$version{,-cpp} cd QR-Code-generator-$version - make DESTDIR=$PKG -C c install + make DESTDIR=$PKG PREFIX=/usr -C c install cd $SRC/QR-Code-generator-$version-cpp - make DESTDIR=$PKG -C cpp install + make DESTDIR=$PKG PREFIX=/usr -C cpp install } diff --git a/libqrcodegen/c-makefile.patch b/libqrcodegen/c-makefile.patch new file mode 100644 index 000000000..98a31f6b5 --- /dev/null +++ b/libqrcodegen/c-makefile.patch @@ -0,0 +1,84 @@ +--- c/Makefile.orig 2021-08-08 17:21:08 UTC ++++ c/Makefile +@@ -29,11 +29,13 @@ + # - CFLAGS: Any extra user-specified compiler flags (can be blank). + + # Recommended compiler flags: +-CFLAGS += -std=c99 -O ++CFLAGS ?= -std=c99 -O + + # Extra flags for diagnostics: + # CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address + ++# Version information ++VERSION = 1.7.0 + + # ---- Controlling make ---- + +@@ -51,18 +53,45 @@ CFLAGS += -std=c99 -O + # ---- Targets to build ---- + + LIB = qrcodegen +-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.h + LIBOBJ = qrcodegen.o + MAINS = qrcodegen-demo qrcodegen-test + ++# 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) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -L . -l $(LIB) +@@ -72,12 +101,15 @@ qrcodegen-test: qrcodegen-test.c $(LIBOB + $(CC) $(CFLAGS) $(LDFLAGS) -DQRCODEGEN_TEST -o $@ $^ + + # The library +-$(LIBFILE): $(LIBOBJ) ++$(ARFILE): $(LIBOBJ) + $(AR) -crs $@ -- $^ + ++$(LIBFILE): $(LIBOBJ) ++ $(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $@ $^ ++ + # Object files + %.o: %.c .deps/timestamp +- $(CC) $(CFLAGS) -c -o $@ -MMD -MF .deps/$*.d $< ++ $(CC) $(CFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $< + + # Have a place to store header dependencies automatically generated by compiler + .deps/timestamp: 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) diff --git a/libqrcodegen/qr-code-generator-build-fixes.patch b/libqrcodegen/qr-code-generator-build-fixes.patch deleted file mode 100644 index 64ea1125d..000000000 --- a/libqrcodegen/qr-code-generator-build-fixes.patch +++ /dev/null @@ -1,143 +0,0 @@ -diff -up QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/c/Makefile.1~ QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/c/Makefile ---- QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/c/Makefile.1~ 2020-01-29 18:52:21.000000000 +0100 -+++ QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/c/Makefile 2020-03-02 05:14:45.909539003 +0100 -@@ -29,11 +29,13 @@ - # - CFLAGS: Any extra user-specified compiler flags (can be blank). - - # Recommended compiler flags: --CFLAGS += -std=c99 -O -+CFLAGS += -std=c99 - - # Extra flags for diagnostics: - # CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address - -+# Version information -+VERSION = 1.5.0 - - # ---- Controlling make ---- - -@@ -51,10 +53,18 @@ CFLAGS += -std=c99 -O - # ---- Targets to build ---- - - LIB = qrcodegen --LIBFILE = 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.h - LIBOBJ = qrcodegen.o - MAINS = qrcodegen-demo qrcodegen-test qrcodegen-worker - -+# define paths to install -+INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen -+LIBDIR ?= $(DESTDIR)/usr/lib -+ - # Build all binaries - all: $(LIBFILE) $(MAINS) - -@@ -63,6 +73,18 @@ clean: - rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS) - rm -rf .deps - -+install-shared: $(LIBFILE) -+ install -d $(LIBDIR) || true -+ install -m 0755 $(LIBFILE) $(LIBDIR)/$(REAL_NAME) -+ ln -s $(REAL_NAME) $(LIBDIR)/$(SO_NAME) -+ ln -s $(SO_NAME) $(LIBDIR)/$(LIBFILE) -+ -+install-header: $(HEADERS) -+ install -d $(INCLUDEDIR) || true -+ install -m 0644 $(HEADERS) $(INCLUDEDIR)/ -+ -+install: install-shared install-header -+ - # Executable files - %: %.o $(LIBFILE) - $(CC) $(CFLAGS) -o $@ $< -L . -l $(LIB) -@@ -73,11 +95,11 @@ qrcodegen-test: qrcodegen-test.c $(LIBOB - - # The library - $(LIBFILE): $(LIBOBJ) -- $(AR) -crs $@ -- $^ -+ $(CC) $(CXXFLAGS) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $@ $^ - - # Object files - %.o: %.c .deps/timestamp -- $(CC) $(CFLAGS) -c -o $@ -MMD -MF .deps/$*.d $< -+ $(CC) $(CFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $< - - # Have a place to store header dependencies automatically generated by compiler - .deps/timestamp: -diff -up QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/cpp/Makefile.1~ QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/cpp/Makefile ---- QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/cpp/Makefile.1~ 2020-01-29 18:52:21.000000000 +0100 -+++ QR-Code-generator-13a25580a3e2a29b2b6653802d58d39056f3eaf2/cpp/Makefile 2020-03-02 05:15:35.901541207 +0100 -@@ -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 - - # Extra flags for diagnostics: - # CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address - -+# Version information -+VERSION = 1.5.0 - - # ---- Controlling make ---- - -@@ -50,11 +52,19 @@ CXXFLAGS += -std=c++11 -O - - # ---- Targets to build ---- - --LIB = qrcodegen --LIBFILE = lib$(LIB).a -+LIB = qrcodegencpp -+LIBFILE = lib$(LIB).so -+# Bump the soname number when the ABI changes and gets incompatible -+SO_NAME = $(LIBFILE).1 -+REAL_NAME = $(LIBFILE).$(VERSION) -+HEADERS = QrCode.hpp - LIBOBJ = QrCode.o - MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker - -+# define paths to install -+INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen -+LIBDIR ?= $(DESTDIR)/usr/lib -+ - # Build all binaries - all: $(LIBFILE) $(MAINS) - -@@ -63,17 +73,29 @@ clean: - rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS) - rm -rf .deps - -+install-shared: $(LIBFILE) -+ install -d $(LIBDIR) || true -+ install -m 0755 $(LIBFILE) $(LIBDIR)/$(REAL_NAME) -+ ln -s $(REAL_NAME) $(LIBDIR)/$(SO_NAME) -+ ln -s $(SO_NAME) $(LIBDIR)/$(LIBFILE) -+ -+install-header: $(HEADERS) -+ install -d $(INCLUDEDIR) || true -+ install -m 0644 $(HEADERS) $(INCLUDEDIR)/ -+ -+install: install-shared install-header -+ - # Executable files - %: %.o $(LIBFILE) - $(CXX) $(CXXFLAGS) -o $@ $< -L . -l $(LIB) - - # The library - $(LIBFILE): $(LIBOBJ) -- $(AR) -crs $@ -- $^ -+ $(CXX) $(CXXFLAGS) -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: