Date: Sun, 09 May 2021 14:12:28 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 255725] [Bug] pkg-config of librtlsdr (comms/rtl-sdr) unnecessarily forces -std=gnu89 Message-ID: <bug-255725-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255725 Bug ID: 255725 Summary: [Bug] pkg-config of librtlsdr (comms/rtl-sdr) unnecessarily forces -std=3Dgnu89 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: martymac@FreeBSD.org Reporter: nsonack@outlook.com Assignee: martymac@FreeBSD.org Flags: maintainer-feedback?(martymac@FreeBSD.org) Created attachment 224791 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D224791&action= =3Dedit Proposed Patch When I tried to build a C99 compliant piece of C code that=20 depended on librtlsdr, I ran into the problem that the pkg-config of comms/rtl-sdr in /usr/local/libdata/pkgconfig/librtlsdr.pc=20 caused all builds to fail, because of C standards violation,=20 which is very annoying, as the original library doesn't seem require GNU89 C. Building rtl-sdr by hand from the upstream source and comparing the two .pc files, I see: [nico@hades ~/build/rtl-sdr]$ cat librtlsdr.pc prefix=3D/usr/local exec_prefix=3D${prefix} libdir=3D${exec_prefix}/lib includedir=3D${prefix}/include Name: RTL-SDR Library Description: C Utility Library Version: 0.5.4.38-0847 Cflags: -I${includedir}/ Libs: -L${libdir} -lrtlsdr Libs.private: -lusb-1.0 -lusb=20 [nico@hades ~/build/rtl-sdr]$ cat /usr/local/libdata/pkgconfig/librtlsdr.pc= =20 prefix=3D/usr/local exec_prefix=3D${prefix} libdir=3D${exec_prefix}/lib includedir=3D${prefix}/include Name: RTL-SDR Library Description: C Utility Library Version: UNKNOWN Cflags: -I${includedir}/ -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=3Dgnu89=20=20 Libs: -L${libdir} -lrtlsdr Libs.private: -lusb=20 [nico@hades ~/build/rtl-sdr]$=20 Having that in mind, I removed the line in the Makefile of the port that forced the gnu89 "standard" and everything seems to be working just fine. Also, I noticed that in order to build the port, GNU make is not required. Attached I have a proposal for a patch to remove those strange requirements. I have tested it on:=20 [nico@hades /usr/ports/comms/rtl-sdr]$ uname -apKU FreeBSD hades.herrhotzenplotz.geek 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 amd64 1300139 1300139 [nico@hades /usr/ports/comms/rtl-sdr]$=20 If the dependency on GNU Make or GNU89 C is because of a different=20 CPU architecture, I would suggest to make those requirements=20 specific to the platform. Please correct me if I am wrong with any of my previous statements. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255725-7788>