Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2020 11:13:06 +0000 (UTC)
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r523614 - in head/graphics: . qr-code-generator qr-code-generator/files
Message-ID:  <202001201113.00KBD6vv057839@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lwhsu
Date: Mon Jan 20 11:13:06 2020
New Revision: 523614
URL: https://svnweb.freebsd.org/changeset/ports/523614

Log:
  Add graphics/qr-code-generator, high-quality QR Code generator library

Added:
  head/graphics/qr-code-generator/
  head/graphics/qr-code-generator/Makefile   (contents, props changed)
  head/graphics/qr-code-generator/distinfo   (contents, props changed)
  head/graphics/qr-code-generator/files/
  head/graphics/qr-code-generator/files/Makefile   (contents, props changed)
  head/graphics/qr-code-generator/files/patch-c_Makefile   (contents, props changed)
  head/graphics/qr-code-generator/files/patch-cpp_Makefile   (contents, props changed)
  head/graphics/qr-code-generator/pkg-descr   (contents, props changed)
  head/graphics/qr-code-generator/pkg-plist   (contents, props changed)
Modified:
  head/graphics/Makefile

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Mon Jan 20 11:07:29 2020	(r523613)
+++ head/graphics/Makefile	Mon Jan 20 11:13:06 2020	(r523614)
@@ -891,6 +891,7 @@
     SUBDIR += qgis
     SUBDIR += qgis-ltr
     SUBDIR += qiv
+    SUBDIR += qr-code-generator
     SUBDIR += qt5-3d
     SUBDIR += qt5-graphicaleffects
     SUBDIR += qt5-imageformats

Added: head/graphics/qr-code-generator/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/Makefile	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+PORTNAME=	qr-code-generator
+PORTVERSION=	1.5.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	graphics
+
+MAINTAINER=	lwhsu@FreeBSD.org
+COMMENT=	High-quality QR Code generator library
+
+LICENSE=	MIT
+
+USES=	gmake
+
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	nayuki
+GH_PROJECT=	QR-Code-generator
+GH_TAGNAME=	67c6246
+
+PLIST_SUB=	VERSION=${PORTVERSION}
+
+post-patch:
+	${CP} ${FILESDIR}/Makefile ${WRKSRC}
+	${REINPLACE_CMD} -e 's,$$(DESTDIR)/usr,${STAGEDIR}${PREFIX},' ${WRKSRC}/c/Makefile
+	${REINPLACE_CMD} -e 's,$$(DESTDIR)/usr,${STAGEDIR}${PREFIX},' ${WRKSRC}/cpp/Makefile
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libqrcodegen.so.${PORTVERSION}
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libqrcodegencpp.so.${PORTVERSION}
+
+.include <bsd.port.mk>

Added: head/graphics/qr-code-generator/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/distinfo	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1578282971
+SHA256 (nayuki-QR-Code-generator-v1.5.0-67c6246_GH0.tar.gz) = a9b83deee76bbe35770bf36a669494358dfe1d8aec3b2e6f9e216c9e830457ac
+SIZE (nayuki-QR-Code-generator-v1.5.0-67c6246_GH0.tar.gz) = 136401

Added: head/graphics/qr-code-generator/files/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/files/Makefile	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,10 @@
+SUBDIRS= c cpp
+
+TARGETS= all clean install
+
+.PHONY: $(TARGETS) $(SUBDIRS)
+
+$(TARGETS): $(SUBDIRS)
+
+$(SUBDIRS):
+	$(MAKE) -C $@ $(MAKECMDGOALS)

Added: head/graphics/qr-code-generator/files/patch-c_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/files/patch-c_Makefile	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,85 @@
+From https://github.com/nayuki/QR-Code-generator/pull/72
+--- c/Makefile.orig	2019-10-14 00:20:16 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.5.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 qrcodegen-worker
+ 
++# define paths to install
++INCLUDEDIR ?= $(DESTDIR)/usr/include/qrcodegen
++LIBDIR ?= $(DESTDIR)/usr/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) -o $@ $< -L . -l $(LIB)
+@@ -72,12 +101,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:

Added: head/graphics/qr-code-generator/files/patch-cpp_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/files/patch-cpp_Makefile	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,86 @@
+From https://github.com/nayuki/QR-Code-generator/pull/72
+--- cpp/Makefile.orig	2019-10-14 00:20:16 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.5.0
+ 
+ # ---- Controlling make ----
+ 
+@@ -50,30 +52,61 @@ CXXFLAGS += -std=c++11 -O
+ 
+ # ---- Targets to build ----
+ 
+-LIB = qrcodegen
+-LIBFILE = lib$(LIB).a
++LIB = qrcodegencpp
++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) $(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)
++	$(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:

Added: head/graphics/qr-code-generator/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/pkg-descr	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,6 @@
+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.
+
+WWW: https://www.nayuki.io/page/qr-code-generator-library

Added: head/graphics/qr-code-generator/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/qr-code-generator/pkg-plist	Mon Jan 20 11:13:06 2020	(r523614)
@@ -0,0 +1,12 @@
+include/qrcodegen/BitBuffer.hpp
+include/qrcodegen/QrCode.hpp
+include/qrcodegen/QrSegment.hpp
+include/qrcodegen/qrcodegen.h
+lib/libqrcodegen.a
+lib/libqrcodegen.so
+lib/libqrcodegen.so.1
+lib/libqrcodegen.so.%%VERSION%%
+lib/libqrcodegencpp.a
+lib/libqrcodegencpp.so
+lib/libqrcodegencpp.so.1
+lib/libqrcodegencpp.so.%%VERSION%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001201113.00KBD6vv057839>