pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libnfc: Import libnfc-1.8.0 as wip/libnfc



Module Name:	pkgsrc-wip
Committed By:	Denis Bodor <lefinnois%lefinnois.net@localhost>
Pushed By:	drrb
Date:		Fri May 20 11:34:17 2022 +0200
Changeset:	5a750a32ef4b48ea74d780c1a067918d04d28e9b

Modified Files:
	Makefile
Added Files:
	libnfc/DESCR
	libnfc/Makefile
	libnfc/PLIST
	libnfc/buildlink3.mk
	libnfc/distinfo
	libnfc/options.mk
	libnfc/patches/patch-configure

Log Message:
libnfc: Import libnfc-1.8.0 as wip/libnfc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5a750a32ef4b48ea74d780c1a067918d04d28e9b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                       |  1 +
 libnfc/DESCR                   |  7 +++++
 libnfc/Makefile                | 39 ++++++++++++++++++++++++++++
 libnfc/PLIST                   | 49 +++++++++++++++++++++++++++++++++++
 libnfc/buildlink3.mk           | 38 +++++++++++++++++++++++++++
 libnfc/distinfo                |  6 +++++
 libnfc/options.mk              | 59 ++++++++++++++++++++++++++++++++++++++++++
 libnfc/patches/patch-configure | 15 +++++++++++
 8 files changed, 214 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 241e6e52f3..6be0a03254 100644
--- a/Makefile
+++ b/Makefile
@@ -2154,6 +2154,7 @@ SUBDIR+=	libncl
 SUBDIR+=	libnest2d-ultimaker
 SUBDIR+=	libnestedsums
 SUBDIR+=	libneural
+SUBDIR+=	libnfc
 SUBDIR+=	libnfo
 SUBDIR+=	libnl
 SUBDIR+=	libnl1
diff --git a/libnfc/DESCR b/libnfc/DESCR
new file mode 100644
index 0000000000..a179793b1f
--- /dev/null
+++ b/libnfc/DESCR
@@ -0,0 +1,7 @@
+libnfc is the first libre low level NFC SDK and Programmers API
+released under the GNU Lesser General Public License. It provides
+complete transparency and royalty-free use for everyone.
+
+The library currently supports modulations for ISO/IEC 14443 A and
+B, FeliCa, Jewel/Topaz tags and Data Exchange Protocol (P2P) as
+target and as initiator.
diff --git a/libnfc/Makefile b/libnfc/Makefile
new file mode 100644
index 0000000000..ede912f31f
--- /dev/null
+++ b/libnfc/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD$
+
+DISTNAME=	libnfc-1.8.0
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=nfc-tools/libnfc/releases/download/libnfc-1.8.0/}
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	lefinnois%lefinnois.net@localhost
+HOMEPAGE=	http://nfc-tools.org/index.php?title=Libnfc
+COMMENT=	Low level NFC SDK and Programmers API
+LICENSE=	gnu-lgpl-v3
+
+GNU_CONFIGURE=	yes
+USE_LIBTOOL=	yes
+USE_TOOLS+=	pkg-config
+USE_LANGUAGES+=	c c++
+
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+
+EGDIR=			${PREFIX}/share/examples/libnfc
+CONF_FILES+=		${EGDIR}/libnfc.conf ${PKG_SYSCONFDIR}/nfc/libnfc.conf
+
+.include "options.mk"
+
+PKGCONFIG_OVERRIDE+=	libnfc.pc.in
+
+SUBST_CLASSES+=		adjust
+SUBST_STAGE.adjust=	pre-configure
+SUBST_FILES.adjust=	libnfc.conf.sample
+SUBST_SED.adjust+=	-e 's,ttyUSB0,ttyU0,'
+
+INSTALLATION_DIRS=	${EGDIR}
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/libnfc.conf.sample ${DESTDIR}${EGDIR}/libnfc.conf
+
+.include "../../devel/readline/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/libnfc/PLIST b/libnfc/PLIST
new file mode 100644
index 0000000000..54eb301edc
--- /dev/null
+++ b/libnfc/PLIST
@@ -0,0 +1,49 @@
+@comment $NetBSD$
+bin/nfc-anticol
+bin/nfc-barcode
+bin/nfc-dep-initiator
+bin/nfc-dep-target
+bin/nfc-emulate-forum-tag2
+bin/nfc-emulate-forum-tag4
+bin/nfc-emulate-tag
+bin/nfc-emulate-uid
+bin/nfc-jewel
+bin/nfc-list
+bin/nfc-mfclassic
+bin/nfc-mfsetuid
+bin/nfc-mfultralight
+bin/nfc-poll
+bin/nfc-read-forum-tag3
+bin/nfc-relay
+bin/nfc-relay-picc
+bin/nfc-scan-device
+bin/pn53x-diagnose
+bin/pn53x-sam
+bin/pn53x-tamashell
+include/nfc/nfc-emulation.h
+include/nfc/nfc-types.h
+include/nfc/nfc.h
+lib/libnfc.la
+lib/pkgconfig/libnfc.pc
+man/man1/nfc-anticol.1
+man/man1/nfc-barcode.1
+man/man1/nfc-dep-initiator.1
+man/man1/nfc-dep-target.1
+man/man1/nfc-emulate-forum-tag2.1
+man/man1/nfc-emulate-forum-tag4.1
+man/man1/nfc-emulate-tag.1
+man/man1/nfc-emulate-uid.1
+man/man1/nfc-jewel.1
+man/man1/nfc-list.1
+man/man1/nfc-mfclassic.1
+man/man1/nfc-mfsetuid.1
+man/man1/nfc-mfultralight.1
+man/man1/nfc-poll.1
+man/man1/nfc-read-forum-tag3.1
+man/man1/nfc-relay-picc.1
+man/man1/nfc-relay.1
+man/man1/nfc-scan-device.1
+man/man1/pn53x-diagnose.1
+man/man1/pn53x-sam.1
+man/man1/pn53x-tamashell.1
+share/examples/libnfc/libnfc.conf
diff --git a/libnfc/buildlink3.mk b/libnfc/buildlink3.mk
new file mode 100644
index 0000000000..2c1edfbcc1
--- /dev/null
+++ b/libnfc/buildlink3.mk
@@ -0,0 +1,38 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	libnfc
+
+.if !defined(LIBNFC_BUILDLINK3_MK)
+LIBNFC_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libnfc+=	libnfc>=1.7.1
+BUILDLINK_ABI_DEPENDS.libnfc+=	libnfc>=1.8.0
+BUILDLINK_PKGSRCDIR.libnfc?=	../../wip/libnfc
+
+pkgbase :=	libnfc
+.include "../../mk/pkg-build-options.mk"
+
+.if ${PKG_BUILD_OPTIONS.libnfc:Mpcsc}
+#.if !empty(PKG_BUILD_OPTIONS.libnfc:Mpcsc)
+.include "../../security/pcsc-lite/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.libnfc:Macr122pcsc}
+#.if !empty(PKG_BUILD_OPTIONS.libnfc:Macr122pcsc)
+.include "../../security/pcsc-lite/buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.libnfc:Macr122usb}
+#.if !empty(PKG_BUILD_OPTIONS.libnfc:Macr122usb)
+.include "../../mk/libusb.buildlink3.mk"
+.endif
+
+.if ${PKG_BUILD_OPTIONS.libnfc:Mpn53xusb}
+#.if !empty(PKG_BUILD_OPTIONS.libnfc:Mpn53xusb)
+.include "../../mk/libusb.buildlink3.mk"
+.endif
+
+.include "../../devel/readline/buildlink3.mk"
+.endif # LIBNFC_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-libnfc
diff --git a/libnfc/distinfo b/libnfc/distinfo
new file mode 100644
index 0000000000..0123df4dd2
--- /dev/null
+++ b/libnfc/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (libnfc-1.8.0.tar.bz2) = 152ab2ba303a3c33f7dc880b83fa409a252c87b0f8a220159c4434b43fec6f16
+SHA512 (libnfc-1.8.0.tar.bz2) = aa8762ecb5b94167d20346f2c81491bb5b634bcedbf2aae3e2efdb301bca89ceb7c2e15148d0934fdc1cce6d77ee0225e28e84893232999fdc09d8a90ae2a7c5
+Size (libnfc-1.8.0.tar.bz2) = 553511 bytes
+SHA1 (patch-configure) = 97bc5b4405db8f323554c1d554965a9ddbc58cc8
diff --git a/libnfc/options.mk b/libnfc/options.mk
new file mode 100644
index 0000000000..13b73b90aa
--- /dev/null
+++ b/libnfc/options.mk
@@ -0,0 +1,59 @@
+# $NetBSD$
+PKG_OPTIONS_VAR=	PKG_OPTIONS.libnfc
+PKG_SUPPORTED_OPTIONS=	pcsc acr122pcsc acr122usb acr122s arygon pn532uart pn53xusb doc
+PKG_SUGGESTED_OPTIONS=	acr122usb acr122s arygon pn532uart pn53xusb
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mpcsc)
+PCSC_DRIVER=	acr122_pcsc,
+.include "../../security/pcsc-lite/buildlink3.mk"
+.else
+PCSC_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Macr122pcsc)
+ACR122_PCSC_DRIVER=	acr122_pcsc,
+.include "../../security/pcsc-lite/buildlink3.mk"
+.else
+ACR122_PCSC_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Macr122usb)
+ACR122_USB_DRIVER=	acr122_usb,
+.include "../../mk/libusb.buildlink3.mk"
+.else
+ACR122_USB_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Macr122s)
+ACR122S_DRIVER=	acr122s,
+.else
+ACR122S_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Marygon)
+ARYGON_DRIVER=	arygon,
+.else
+ARYGON_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Mpn532uart)
+PN532_UART_DRIVER=	pn532_uart,
+.else
+PN532_UART_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Mpn53xusb)
+PN53X_USB_DRIVER=	pn53x_usb,
+.include "../../mk/libusb.buildlink3.mk"
+.else
+PN53X_USB_DRIVER=
+.endif
+
+.if !empty(PKG_OPTIONS:Mdoc)
+CONFIGURE_ARGS+=	--enable-doc
+BUILD_DEPENDS+=		doxygen>=1.8.11:../../devel/doxygen
+.endif
+
+CONFIGURE_ARGS+=	--with-drivers="${PCSC_DRIVER}${ACR122_PCSC_DRIVER}${ACR122_USB_DRIVER}${ACR122S_DRIVER}${ARYGON_DRIVER}${PN532_I2C_DRIVER}${PN532_SPI_DRIVER}${PN532_UART_DRIVER}${PN53X_USB_DRIVER}"
diff --git a/libnfc/patches/patch-configure b/libnfc/patches/patch-configure
new file mode 100644
index 0000000000..33a352233e
--- /dev/null
+++ b/libnfc/patches/patch-configure
@@ -0,0 +1,15 @@
+$NetBSD$
+
+POSIXly correct test(1) for equality.
+
+--- configure.orig	2022-04-26 13:05:15.329563183 +0000
++++ configure
+@@ -14804,7 +14804,7 @@ fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline.h" >&5
+ $as_echo_n "checking for readline.h... " >&6; }
+ 
+-  if test "x$cross_compiling" == "xyes"; then
++  if test "x$cross_compiling" = "xyes"; then
+       without_readline=yes
+   fi
+ 


Home | Main Index | Thread Index | Old Index