Accepting request 877846 from home:dirkmueller:Factory

- update to 1.6.0:
  * https://github.com/nayuki/QR-Code-generator/compare/v1.5.0...v1.6.0
- drop cflags.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/877846
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/QR-Code-generator?expand=0&rev=6
This commit is contained in:
Fridrich Strba 2021-03-25 21:38:31 +00:00 committed by Git OBS Bridge
parent 2a565aeaa0
commit d6aa3cd03d
8 changed files with 47 additions and 106 deletions

View File

@ -8,11 +8,11 @@ Subject: [PATCH 3/5] Generate both shared and static libraries
cpp/Makefile | 14 ++++++++++---- cpp/Makefile | 14 ++++++++++----
2 files changed, 20 insertions(+), 8 deletions(-) 2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/c/Makefile b/c/Makefile Index: QR-Code-generator-1.6.0/c/Makefile
index bf79462..38eda2d 100644 ===================================================================
--- a/c/Makefile --- QR-Code-generator-1.6.0.orig/c/Makefile
+++ b/c/Makefile +++ QR-Code-generator-1.6.0/c/Makefile
@@ -51,16 +51,19 @@ CFLAGS ?= -std=c99 -O @@ -51,16 +51,19 @@ CFLAGS += -std=c99 -O
# ---- Targets to build ---- # ---- Targets to build ----
LIB = qrcodegen LIB = qrcodegen
@ -35,7 +35,7 @@ index bf79462..38eda2d 100644
rm -rf .deps rm -rf .deps
# Executable files # Executable files
@@ -72,9 +75,12 @@ qrcodegen-test: qrcodegen-test.c $(LIBOBJ:%.o=%.c) @@ -72,9 +75,12 @@ qrcodegen-test: qrcodegen-test.c $(LIBOB
$(CC) $(CFLAGS) -DQRCODEGEN_TEST -o $@ $^ $(CC) $(CFLAGS) -DQRCODEGEN_TEST -o $@ $^
# The library # The library
@ -49,11 +49,11 @@ index bf79462..38eda2d 100644
# Object files # Object files
%.o: %.c .deps/timestamp %.o: %.c .deps/timestamp
$(CC) $(CFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $< $(CC) $(CFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $<
diff --git a/cpp/Makefile b/cpp/Makefile Index: QR-Code-generator-1.6.0/cpp/Makefile
index deb8924..2f5b2af 100644 ===================================================================
--- a/cpp/Makefile --- QR-Code-generator-1.6.0.orig/cpp/Makefile
+++ b/cpp/Makefile +++ QR-Code-generator-1.6.0/cpp/Makefile
@@ -51,16 +51,19 @@ CXXFLAGS ?= -std=c++11 -O @@ -51,16 +51,19 @@ CXXFLAGS += -std=c++11 -O
# ---- Targets to build ---- # ---- Targets to build ----
LIB = qrcodegen LIB = qrcodegen
@ -62,17 +62,17 @@ index deb8924..2f5b2af 100644
+LIBFILE = lib$(LIB).so +LIBFILE = lib$(LIB).so
+# Bump the soname number when the ABI changes and gets incompatible +# Bump the soname number when the ABI changes and gets incompatible
+SO_NAME = $(LIBFILE).1 +SO_NAME = $(LIBFILE).1
LIBOBJ = BitBuffer.o QrCode.o QrSegment.o LIBOBJ = QrCode.o
MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker
# Build all binaries # Build all binaries
-all: $(LIBFILE) $(MAINS) -all: $(LIBFILE) $(MAINS)
+all: $(LIBFILE) $(ARFILE) $(MAINS) +all: $(ARFILE) $(LIBFILE) $(MAINS)
# Delete build output # Delete build output
clean: clean:
- rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS) - rm -f -- $(LIBOBJ) $(LIBFILE) $(MAINS:=.o) $(MAINS)
+ rm -f -- $(LIBOBJ) $(LIBFILE) $(ARFILE) $(MAINS:=.o) $(MAINS) + rm -f -- $(LIBOBJ) $(ARFILE) $(LIBFILE) $(MAINS:=.o) $(MAINS)
rm -rf .deps rm -rf .deps
# Executable files # Executable files
@ -90,6 +90,3 @@ index deb8924..2f5b2af 100644
# Object files # Object files
%.o: %.cpp .deps/timestamp %.o: %.cpp .deps/timestamp
$(CXX) $(CXXFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $< $(CXX) $(CXXFLAGS) -fPIC -c -o $@ -MMD -MF .deps/$*.d $<
--
2.24.0

View File

@ -8,11 +8,11 @@ Subject: [PATCH 4/5] Create install targets for C and CPP
cpp/Makefile | 27 +++++++++++++++++++++++++++ cpp/Makefile | 27 +++++++++++++++++++++++++++
2 files changed, 53 insertions(+) 2 files changed, 53 insertions(+)
diff --git a/c/Makefile b/c/Makefile Index: QR-Code-generator-1.6.0/c/Makefile
index 38eda2d..7521944 100644 ===================================================================
--- a/c/Makefile --- QR-Code-generator-1.6.0.orig/c/Makefile
+++ b/c/Makefile +++ QR-Code-generator-1.6.0/c/Makefile
@@ -34,6 +34,8 @@ CFLAGS ?= -std=c99 -O @@ -34,6 +34,8 @@ CFLAGS += -std=c99 -O
# Extra flags for diagnostics: # Extra flags for diagnostics:
# CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address # CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
@ -62,11 +62,11 @@ index 38eda2d..7521944 100644
# Executable files # Executable files
%: %.o $(LIBFILE) %: %.o $(LIBFILE)
$(CC) $(CFLAGS) -o $@ $< -L . -l $(LIB) $(CC) $(CFLAGS) -o $@ $< -L . -l $(LIB)
diff --git a/cpp/Makefile b/cpp/Makefile Index: QR-Code-generator-1.6.0/cpp/Makefile
index 2f5b2af..d131f30 100644 ===================================================================
--- a/cpp/Makefile --- QR-Code-generator-1.6.0.orig/cpp/Makefile
+++ b/cpp/Makefile +++ QR-Code-generator-1.6.0/cpp/Makefile
@@ -34,6 +34,8 @@ CXXFLAGS ?= -std=c++11 -O @@ -34,6 +34,8 @@ CXXFLAGS += -std=c++11 -O
# Extra flags for diagnostics: # Extra flags for diagnostics:
# CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address # CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
@ -75,25 +75,24 @@ index 2f5b2af..d131f30 100644
# ---- Controlling make ---- # ---- Controlling make ----
@@ -55,9 +57,16 @@ ARFILE = lib$(LIB).a @@ -55,9 +57,15 @@ ARFILE = lib$(LIB).a
LIBFILE = lib$(LIB).so LIBFILE = lib$(LIB).so
# Bump the soname number when the ABI changes and gets incompatible # Bump the soname number when the ABI changes and gets incompatible
SO_NAME = $(LIBFILE).1 SO_NAME = $(LIBFILE).1
+REAL_NAME = $(LIBFILE).$(VERSION) +REAL_NAME = $(LIBFILE).$(VERSION)
+HEADERS = BitBuffer.hpp QrCode.hpp QrSegment.hpp +HEADERS = QrCode.hpp
LIBOBJ = BitBuffer.o QrCode.o QrSegment.o LIBOBJ = QrCode.o
MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker
+# define paths to install +# define paths to install
+INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen +INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen
+LIBDIR ?= $(DESTDIR)/usr/lib +LIBDIR ?= $(DESTDIR)/usr/lib
+
+ +
# Build all binaries # Build all binaries
all: $(LIBFILE) $(ARFILE) $(MAINS) all: $(ARFILE) $(LIBFILE) $(MAINS)
@@ -66,6 +75,24 @@ clean: @@ -66,6 +74,24 @@ clean:
rm -f -- $(LIBOBJ) $(LIBFILE) $(ARFILE) $(MAINS:=.o) $(MAINS) rm -f -- $(LIBOBJ) $(ARFILE) $(LIBFILE) $(MAINS:=.o) $(MAINS)
rm -rf .deps rm -rf .deps
+install-shared: $(LIBFILE) +install-shared: $(LIBFILE)
@ -117,6 +116,3 @@ index 2f5b2af..d131f30 100644
# Executable files # Executable files
%: %.o $(LIBFILE) %: %.o $(LIBFILE)
$(CXX) $(CXXFLAGS) -o $@ $< -L . -l $(LIB) $(CXX) $(CXXFLAGS) -o $@ $< -L . -l $(LIB)
--
2.24.0

View File

@ -7,10 +7,10 @@ Subject: [PATCH 5/5] Rename cpp library to qrcodegencpp to avoid conflict
cpp/Makefile | 2 +- cpp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/Makefile b/cpp/Makefile Index: QR-Code-generator-1.6.0/cpp/Makefile
index d131f30..2e7ed1f 100644 ===================================================================
--- a/cpp/Makefile --- QR-Code-generator-1.6.0.orig/cpp/Makefile
+++ b/cpp/Makefile +++ QR-Code-generator-1.6.0/cpp/Makefile
@@ -52,7 +52,7 @@ VERSION = 1.5.0 @@ -52,7 +52,7 @@ VERSION = 1.5.0
# ---- Targets to build ---- # ---- Targets to build ----
@ -20,6 +20,3 @@ index d131f30..2e7ed1f 100644
ARFILE = lib$(LIB).a ARFILE = lib$(LIB).a
LIBFILE = lib$(LIB).so LIBFILE = lib$(LIB).so
# Bump the soname number when the ABI changes and gets incompatible # Bump the soname number when the ABI changes and gets incompatible
--
2.24.0

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Mar 8 23:39:10 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 1.6.0:
* https://github.com/nayuki/QR-Code-generator/compare/v1.5.0...v1.6.0
- drop cflags.patch (upstream)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 21 12:19:03 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com> Tue Jan 21 12:19:03 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package QR-Code-generator # spec file for package QR-Code-generator
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -20,13 +20,12 @@
%define libcname libqrcodegen1 %define libcname libqrcodegen1
%define libcppname libqrcodegencpp1 %define libcppname libqrcodegencpp1
Name: QR-Code-generator Name: QR-Code-generator
Version: 1.5.0 Version: 1.6.0
Release: 0 Release: 0
Summary: QR Code generator library Summary: QR Code generator library
License: MIT License: MIT
URL: https://github.com/nayuki/QR-Code-generator URL: https://github.com/nayuki/QR-Code-generator
Source: https://github.com/nayuki/QR-Code-generator/archive/v%{version}.tar.gz Source: https://github.com/nayuki/QR-Code-generator/archive/v%{version}.tar.gz
Patch0: cflags.patch
Patch2: 0002-Make-use-of-fPIC-parameter-when-building.patch Patch2: 0002-Make-use-of-fPIC-parameter-when-building.patch
Patch3: 0003-Generate-both-shared-and-static-libraries.patch Patch3: 0003-Generate-both-shared-and-static-libraries.patch
Patch4: 0004-Create-install-targets-for-C-and-CPP.patch Patch4: 0004-Create-install-targets-for-C-and-CPP.patch

View File

@ -1,56 +0,0 @@
From 7eac8beffeb935de5a2fdd65656d8cb500b0abda Mon Sep 17 00:00:00 2001
From: Project Nayuki <me@nayuki.io>
Date: Fri, 9 Aug 2019 23:00:13 +0000
Subject: [PATCH] Updated C and C++ makefiles to exclude warnings and
sanitizers by default, instead recommending extra flags for manually doing a
diagnostic/debug build.
---
c/Makefile | 11 +++++------
cpp/Makefile | 11 +++++------
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/c/Makefile b/c/Makefile
index 99f926b..fd0c367 100644
--- a/c/Makefile
+++ b/c/Makefile
@@ -28,12 +28,11 @@
# - 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
+# Recommended compiler flags:
+CFLAGS += -std=c99 -O
+
+# Extra flags for diagnostics:
+# CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
# ---- Controlling make ----
diff --git a/cpp/Makefile b/cpp/Makefile
index 858a1bf..1d32943 100644
--- a/cpp/Makefile
+++ b/cpp/Makefile
@@ -28,12 +28,11 @@
# - 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
+# Recommended compiler flags:
+CXXFLAGS += -std=c++11 -O
+
+# Extra flags for diagnostics:
+# CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=undefined,address
# ---- Controlling make ----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6cf993c10fbf96b5e8f8e4eaad8ea1ca3bbc58fb4d00a4728b4f818c27fb4d5e
size 147230

3
v1.6.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8acee5a77325e075b910747ad4b1fdb1491b7e22d0b8f1b5a6ea15ea08ba33a8
size 135432