forked from ports/contrib
libqrcodegen: 1.5.0 -> 1.6.0
This commit is contained in:
parent
2f70a0b2a4
commit
4750f4fecb
@ -1,7 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF37WYnAiztWZsjdKPPUiOp8Ad27dEdP4Xs2sfL333Q3aT2nxVqM8gHSJhSGVk4wt/xIPJWB6kjIOElYrK5T/lzAw=
|
||||
SHA256 (Pkgfile) = d2316a347e2f7d86db4ef2e5d1ebe5cd08c8d491a6d510df77f4421177237b3d
|
||||
RWSagIOpLGJF3xzMc3grSfvZURaoroFRmMx1Ts/qLHT7L1SBmUJ+3JKAQTb7jEkkzbesp1Nm9qMvWM0++Mg6tIXGU1A7VRCYnAU=
|
||||
SHA256 (Pkgfile) = b2995392daba6cac52b258030e717b28e72a0490b041d12419432d63172d6e6c
|
||||
SHA256 (.footprint) = 2daa9a92ed27e2a796e81c61842a73c9fc1a1e04810681b4490619c9b45f7057
|
||||
SHA256 (libqrcodegen-1.5.0.tar.gz) = 6cf993c10fbf96b5e8f8e4eaad8ea1ca3bbc58fb4d00a4728b4f818c27fb4d5e
|
||||
SHA256 (c-lib.patch) = e92ec306be621e01a14d9283616efcc4149c4031778c9bb8db71ffed5115f4bb
|
||||
SHA256 (cpp-lib.patch) = f577f0a44eb82931dd25abafddaf49de1f2d46abe43bdca79380a5c8c4621126
|
||||
SHA256 (libqrcodegen-1.6.0.tar.gz) = 8acee5a77325e075b910747ad4b1fdb1491b7e22d0b8f1b5a6ea15ea08ba33a8
|
||||
SHA256 (qr-code-generator-build-fixes.patch) = 6ee12ffc7b0669f172eb79a37e4b394fd14877761b62bbaa7fa1011f9dd93e30
|
||||
|
@ -4,19 +4,17 @@
|
||||
# Depends on:
|
||||
|
||||
name=libqrcodegen
|
||||
version=1.5.0
|
||||
version=1.6.0
|
||||
release=1
|
||||
source=(https://github.com/nayuki/QR-Code-generator/archive/v$version/$name-$version.tar.gz
|
||||
c-lib.patch cpp-lib.patch)
|
||||
qr-code-generator-build-fixes.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
|
||||
cp -R QR-Code-generator-$version{,-cpp}
|
||||
cd QR-Code-generator-$version
|
||||
# https://raw.githubusercontent.com/OpenMandrivaAssociation/libqrcodegen/master/c-lib.patch
|
||||
patch -Np1 -i $SRC/c-lib.patch
|
||||
make DESTDIR=$PKG -C c install
|
||||
cd $SRC/QR-Code-generator-$version-cpp
|
||||
# https://raw.githubusercontent.com/OpenMandrivaAssociation/libqrcodegen/master/cpp-lib.patch
|
||||
patch -Np1 -i $SRC/cpp-lib.patch
|
||||
make DESTDIR=$PKG -C cpp install
|
||||
}
|
||||
|
@ -1,85 +0,0 @@
|
||||
diff --git a/c/Makefile b/c/Makefile
|
||||
index 99f926b..635faa2 100644
|
||||
--- a/c/Makefile
|
||||
+++ b/c/Makefile
|
||||
@@ -28,13 +28,6 @@
|
||||
# - CC: The C compiler, such as gcc or clang.
|
||||
# - CFLAGS: Any extra user-specified compiler flags (can be blank).
|
||||
|
||||
-# Mandatory compiler flags
|
||||
-CFLAGS += -std=c99
|
||||
-# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC.
|
||||
-CFLAGS += -Wall -fsanitize=undefined
|
||||
-# Optimization level
|
||||
-CFLAGS += -O1
|
||||
-
|
||||
|
||||
# ---- Controlling make ----
|
||||
|
||||
@@ -52,18 +45,45 @@ CFLAGS += -O1
|
||||
# ---- Targets to build ----
|
||||
|
||||
LIB = qrcodegen
|
||||
-LIBFILE = lib$(LIB).a
|
||||
+LIBFILE = lib$(LIB).so
|
||||
+ARFILE = lib$(LIB).a
|
||||
+SO_NAME = $(LIBFILE).1
|
||||
+REAL_NAME = $(LIBFILE).$(QRCODEGEN_VERSION)
|
||||
+HEADERS = qrcodegen.h
|
||||
LIBOBJ = qrcodegen.o
|
||||
MAINS = qrcodegen-demo qrcodegen-test qrcodegen-worker
|
||||
|
||||
+MULTIARCH := $(shell gcc --print-multiarch)
|
||||
+
|
||||
+INCLUDEDIR := $(DESTDIR)/usr/include/qrcodegen
|
||||
+LIBDIR := $(DESTDIR)/usr/lib/$(MULTIARCH)
|
||||
+
|
||||
# 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) -o $@ $< -L . -l $(LIB)
|
||||
@@ -73,12 +93,15 @@ qrcodegen-test: qrcodegen-test.c $(LIBOBJ:%.o=%.c)
|
||||
$(CC) $(CFLAGS) -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:
|
@ -1,85 +0,0 @@
|
||||
diff --git a/cpp/Makefile b/cpp/Makefile
|
||||
index 858a1bf..2f8d8ed 100644
|
||||
--- a/cpp/Makefile
|
||||
+++ b/cpp/Makefile
|
||||
@@ -28,13 +28,6 @@
|
||||
# - CXX: The C++ compiler, such as g++ or clang++.
|
||||
# - CXXFLAGS: Any extra user-specified compiler flags (can be blank).
|
||||
|
||||
-# Mandatory compiler flags
|
||||
-CXXFLAGS += -std=c++11
|
||||
-# Diagnostics. Adding '-fsanitize=address' is helpful for most versions of Clang and newer versions of GCC.
|
||||
-CXXFLAGS += -Wall -fsanitize=undefined
|
||||
-# Optimization level
|
||||
-CXXFLAGS += -O1
|
||||
-
|
||||
|
||||
# ---- Controlling make ----
|
||||
|
||||
@@ -51,30 +44,60 @@ CXXFLAGS += -O1
|
||||
|
||||
# ---- Targets to build ----
|
||||
|
||||
-LIB = qrcodegen
|
||||
-LIBFILE = lib$(LIB).a
|
||||
+LIB = qrcodegencpp
|
||||
+LIBFILE = lib$(LIB).so
|
||||
+ARFILE = lib$(LIB).a
|
||||
+SO_NAME = $(LIBFILE).1
|
||||
+REAL_NAME = $(LIBFILE).$(QRCODEGEN_VERSION)
|
||||
+HEADERS = BitBuffer.hpp QrCode.hpp QrSegment.hpp
|
||||
LIBOBJ = BitBuffer.o QrCode.o QrSegment.o
|
||||
MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker
|
||||
|
||||
+MULTIARCH := $(shell gcc --print-multiarch)
|
||||
+
|
||||
+INCLUDEDIR := $(DESTDIR)/usr/include/qrcodegen
|
||||
+LIBDIR := $(DESTDIR)/usr/lib/$(MULTIARCH)
|
||||
+
|
||||
# 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) -o $@ $< -L . -l $(LIB)
|
||||
|
||||
# The library
|
||||
-$(LIBFILE): $(LIBOBJ)
|
||||
+$(ARFILE): $(LIBOBJ)
|
||||
$(AR) -crs $@ -- $^
|
||||
|
||||
+$(LIBFILE): $(LIBOBJ)
|
||||
+ $(CXX) -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:
|
143
libqrcodegen/qr-code-generator-build-fixes.patch
Normal file
143
libqrcodegen/qr-code-generator-build-fixes.patch
Normal file
@ -0,0 +1,143 @@
|
||||
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:
|
Loading…
x
Reference in New Issue
Block a user