Hello community,

here is the log from the commit of package QR-Code-generator.12212 for 
openSUSE:Leap:15.1:Update checked in at 2020-04-05 08:56:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/QR-Code-generator.12212 (Old)
 and      /work/SRC/openSUSE:Leap:15.1:Update/.QR-Code-generator.12212.new.3248 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "QR-Code-generator.12212"

Sun Apr  5 08:56:13 2020 rev:1 rq:791285 version:1.5.0

Changes:
--------
New Changes file:

--- /dev/null   2020-04-01 01:12:57.297512941 +0200
+++ 
/work/SRC/openSUSE:Leap:15.1:Update/.QR-Code-generator.12212.new.3248/QR-Code-generator.changes
     2020-04-05 08:56:13.651200000 +0200
@@ -0,0 +1,22 @@
+-------------------------------------------------------------------
+Tue Jan 21 12:19:03 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Drop not really needed patch:
+  * 0001-Do-not-append-to-C-XX-FLAGS-but-just-set-them-if-not.patch
+- Fix build on SLE12
+
+-------------------------------------------------------------------
+Tue Dec  3 12:01:27 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patches to make the stuff actually installable:
+  * 0001-Do-not-append-to-C-XX-FLAGS-but-just-set-them-if-not.patch
+  * 0002-Make-use-of-fPIC-parameter-when-building.patch
+  * 0003-Generate-both-shared-and-static-libraries.patch
+  * 0004-Create-install-targets-for-C-and-CPP.patch
+  * 0005-Rename-cpp-library-to-qrcodegencpp-to-avoid-conflict.patch
+  * cflags.patch
+
+-------------------------------------------------------------------
+Tue Dec  3 09:05:13 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Initial commit, needed by libreoffice 6.4

New:
----
  0002-Make-use-of-fPIC-parameter-when-building.patch
  0003-Generate-both-shared-and-static-libraries.patch
  0004-Create-install-targets-for-C-and-CPP.patch
  0005-Rename-cpp-library-to-qrcodegencpp-to-avoid-conflict.patch
  QR-Code-generator.changes
  QR-Code-generator.spec
  cflags.patch
  v1.5.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ QR-Code-generator.spec ++++++
#
# spec file for package QR-Code-generator
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define libcname libqrcodegen1
%define libcppname libqrcodegencpp1
Name:           QR-Code-generator
Version:        1.5.0
Release:        0
Summary:        QR Code generator library
License:        MIT
URL:            https://github.com/nayuki/QR-Code-generator
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
Patch3:         0003-Generate-both-shared-and-static-libraries.patch
Patch4:         0004-Create-install-targets-for-C-and-CPP.patch
Patch5:         0005-Rename-cpp-library-to-qrcodegencpp-to-avoid-conflict.patch
BuildRequires:  %{python_module setuptools}
BuildRequires:  gcc-c++
BuildRequires:  python-rpm-macros
%python_subpackages

%description
This project aims to be the best, clearest QR Code generator library in 
multiple languages.
The primary goals are flexible options and absolute correctness.
Secondary goals are compact implementation size and good documentation comments.

%if 0%{?suse_version} < 1500
# this is hack to make rpm happy as %python_subpackage does not work
%package -n python-%{name}
Summary:        QR Code generator python bindings

%description -n python-%{name}
QR Code generator python2 bindings
%endif

%package devel
Summary:        Development files for QR code generator
Requires:       %{libcname}
Requires:       %{libcppname}
Provides:       qrcodegen-devel

%description devel
Development files, headers/libs for QR code generator

%package -n %{libcname}
Summary:        QR Code generator library

%description -n %{libcname}
C QR Code generator library

%package -n %{libcppname}
Summary:        QR Code generator library

%description -n %{libcppname}
C++ QR Code generator library

%prep
%setup -q
%autopatch -p1

%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
pushd c
make -j1
popd
pushd cpp
make -j1
popd
pushd python
%python_build
popd

%install
pushd c
%make_install LIBDIR=%{buildroot}%{_libdir}
popd
pushd cpp
%make_install LIBDIR=%{buildroot}%{_libdir}
popd
pushd python
%python_install
popd
rm -rf %{buildroot}%{_libdir}/*.a

%post -n %{libcname} -p /sbin/ldconfig
%postun -n %{libcname} -p /sbin/ldconfig
%post -n %{libcppname} -p /sbin/ldconfig
%postun -n %{libcppname} -p /sbin/ldconfig

%files %{python_files}
%license Readme.markdown
%{python_sitelib}/*

%files -n QR-Code-generator-devel
%{_includedir}/*
%{_libdir}/*.so

%files -n %{libcname}
%license Readme.markdown
%{_libdir}/libqrcodegen.so.*

%files -n %{libcppname}
%license Readme.markdown
%{_libdir}/libqrcodegencpp.so.*

%changelog
++++++ 0002-Make-use-of-fPIC-parameter-when-building.patch ++++++
>From 8b4866c98775680abc49e8c1c0c50daa25dea052 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <[email protected]>
Date: Tue, 3 Dec 2019 11:59:59 +0100
Subject: [PATCH 2/5] Make use of -fPIC parameter when building'

---
 c/Makefile   | 2 +-
 cpp/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/Makefile b/c/Makefile
index b27449c..bf79462 100644
--- a/c/Makefile
+++ b/c/Makefile
@@ -77,7 +77,7 @@ $(LIBFILE): $(LIBOBJ)
 
 # 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/cpp/Makefile b/cpp/Makefile
index 62e03c5..deb8924 100644
--- a/cpp/Makefile
+++ b/cpp/Makefile
@@ -73,7 +73,7 @@ $(LIBFILE): $(LIBOBJ)
 
 # 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:
-- 
2.24.0

++++++ 0003-Generate-both-shared-and-static-libraries.patch ++++++
>From 16351a7ebaf318d21632bbaabf0675a70bb67dc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <[email protected]>
Date: Tue, 3 Dec 2019 12:07:19 +0100
Subject: [PATCH 3/5] Generate both shared and static libraries

---
 c/Makefile   | 14 ++++++++++----
 cpp/Makefile | 14 ++++++++++----
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/c/Makefile b/c/Makefile
index bf79462..38eda2d 100644
--- a/c/Makefile
+++ b/c/Makefile
@@ -51,16 +51,19 @@ 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
 LIBOBJ = qrcodegen.o
 MAINS = qrcodegen-demo qrcodegen-test qrcodegen-worker
 
 # 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
 
 # Executable files
@@ -72,9 +75,12 @@ 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) -fPIC -c -o $@ -MMD -MF .deps/$*.d $<
diff --git a/cpp/Makefile b/cpp/Makefile
index deb8924..2f5b2af 100644
--- a/cpp/Makefile
+++ b/cpp/Makefile
@@ -51,16 +51,19 @@ CXXFLAGS ?= -std=c++11 -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
 LIBOBJ = BitBuffer.o QrCode.o QrSegment.o
 MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker
 
 # 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
 
 # Executable files
@@ -68,9 +71,12 @@ clean:
        $(CXX) $(CXXFLAGS) -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) -fPIC -c -o $@ -MMD -MF .deps/$*.d $<
-- 
2.24.0

++++++ 0004-Create-install-targets-for-C-and-CPP.patch ++++++
>From 498d2a0cf6d6f01a3ffb87e358f63c3a64afeb9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <[email protected]>
Date: Tue, 3 Dec 2019 12:45:34 +0100
Subject: [PATCH 4/5] Create install targets for C and CPP

---
 c/Makefile   | 26 ++++++++++++++++++++++++++
 cpp/Makefile | 27 +++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/c/Makefile b/c/Makefile
index 38eda2d..7521944 100644
--- a/c/Makefile
+++ b/c/Makefile
@@ -34,6 +34,8 @@ CFLAGS ?= -std=c99 -O
 # Extra flags for diagnostics:
 # CFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion 
-fsanitize=undefined,address
 
+# Version information
+VERSION = 1.5.0
 
 # ---- Controlling make ----
 
@@ -55,9 +57,15 @@ 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 qrcodegen-worker
 
+# define paths to install
+INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen
+LIBDIR ?= $(DESTDIR)/usr/lib
+
 # Build all binaries
 all: $(LIBFILE) $(ARFILE) $(MAINS)
 
@@ -66,6 +74,24 @@ clean:
        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)
diff --git a/cpp/Makefile b/cpp/Makefile
index 2f5b2af..d131f30 100644
--- a/cpp/Makefile
+++ b/cpp/Makefile
@@ -34,6 +34,8 @@ CXXFLAGS ?= -std=c++11 -O
 # Extra flags for diagnostics:
 # CXXFLAGS += -g -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion 
-fsanitize=undefined,address
 
+# Version information
+VERSION = 1.5.0
 
 # ---- Controlling make ----
 
@@ -55,9 +57,16 @@ 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 = BitBuffer.hpp QrCode.hpp QrSegment.hpp
 LIBOBJ = BitBuffer.o QrCode.o QrSegment.o
 MAINS = QrCodeGeneratorDemo QrCodeGeneratorWorker
 
+# define paths to install
+INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen
+LIBDIR ?= $(DESTDIR)/usr/lib
+
+
 # Build all binaries
 all: $(LIBFILE) $(ARFILE) $(MAINS)
 
@@ -66,6 +75,24 @@ clean:
        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)
-- 
2.24.0

++++++ 0005-Rename-cpp-library-to-qrcodegencpp-to-avoid-conflict.patch ++++++
>From ac482f00f1ad08ba692a24ef5abffe31b659c1d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <[email protected]>
Date: Tue, 3 Dec 2019 12:50:39 +0100
Subject: [PATCH 5/5] Rename cpp library to qrcodegencpp to avoid conflict

---
 cpp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/Makefile b/cpp/Makefile
index d131f30..2e7ed1f 100644
--- a/cpp/Makefile
+++ b/cpp/Makefile
@@ -52,7 +52,7 @@ VERSION = 1.5.0
 
 # ---- Targets to build ----
 
-LIB = qrcodegen
+LIB = qrcodegencpp
 ARFILE = lib$(LIB).a
 LIBFILE = lib$(LIB).so
 # Bump the soname number when the ABI changes and gets incompatible
-- 
2.24.0

++++++ cflags.patch ++++++
>From 7eac8beffeb935de5a2fdd65656d8cb500b0abda Mon Sep 17 00:00:00 2001
From: Project Nayuki <[email protected]>
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 ----

Reply via email to