[Bug 213956] [New Port] devel/libtuntap: Library for configuring TUN or TAP devices in a portable manner
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 1 04:02:07 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213956
Jan Beich (mail not working) <jbeich at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jbeich at FreeBSD.org
--- Comment #3 from Jan Beich (mail not working) <jbeich at FreeBSD.org> ---
Comment on attachment 176352
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=176352
Patch adds devel/libtuntap (with little comment fix)
CXX_WRPR=on build fails on FreeBSD 9.x (add USE_CXXSTD=c++11 to fix):
/usr/local/bin/g++48 -DFreeBSD -DUnix -Dtuntap___EXPORTS -I.
-I/usr/local/include -I/bindings/cpp -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc48
-fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 -O2 -pipe
-Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing
-Wl,-rpath=/usr/local/lib/gcc48 -fPIC -o
CMakeFiles/tuntap++.dir/bindings/cpp/tuntap++.cc.o -c bindings/cpp/tuntap++.cc
In file included from bindings/cpp/tuntap++.cc:1:0:
bindings/cpp/tuntap++.hh:16:22: warning: defaulted and deleted functions only
available with -std=c++11 or -std=gnu++11 [enabled by default]
tun(tun const &) = delete;
^
bindings/cpp/tuntap++.hh:17:36: warning: defaulted and deleted functions only
available with -std=c++11 or -std=gnu++11 [enabled by default]
tun & operator = (tun const &) = delete;
^
bindings/cpp/tuntap++.hh:18:11: error: expected ',' or '...' before '&&'
token
tun(tun &&);
^
bindings/cpp/tuntap++.hh:18:13: error: invalid constructor; you probably
meant 'tuntap::tun (const tuntap::tun&)'
tun(tun &&);
^
bindings/cpp/tuntap++.hh:44:22: warning: defaulted and deleted functions only
available with -std=c++11 or -std=gnu++11 [enabled by default]
tap(tap const &) = delete;
^
bindings/cpp/tuntap++.hh:45:36: warning: defaulted and deleted functions only
available with -std=c++11 or -std=gnu++11 [enabled by default]
tap & operator = (tap const &) = delete;
^
bindings/cpp/tuntap++.hh:46:11: error: expected ',' or '...' before '&&'
token
tap(tap &&);
^
bindings/cpp/tuntap++.hh:46:13: error: invalid constructor; you probably
meant 'tuntap::tap (const tuntap::tap&)'
tap(tap &&);
^
bindings/cpp/tuntap++.cc:20:14: error: expected ',' or '...' before '&&'
token
tun::tun(tun &&t)
^
bindings/cpp/tuntap++.cc:20:1: error: prototype for
'tuntap::tun::tun(tuntap::tun)' does not match any in class 'tuntap::tun'
tun::tun(tun &&t)
^
In file included from bindings/cpp/tuntap++.cc:1:0:
bindings/cpp/tuntap++.hh:16:3: error: candidates are: tuntap::tun::tun(const
tuntap::tun&)
tun(tun const &) = delete;
^
bindings/cpp/tuntap++.cc:9:1: error: tuntap::tun::tun()
tun::tun()
^
bindings/cpp/tuntap++.cc:97:14: error: expected ',' or '...' before '&&'
token
tap::tap(tap &&t)
^
bindings/cpp/tuntap++.cc:97:1: error: prototype for
'tuntap::tap::tap(tuntap::tap)' does not match any in class 'tuntap::tap'
tap::tap(tap &&t)
^
In file included from bindings/cpp/tuntap++.cc:1:0:
bindings/cpp/tuntap++.hh:44:3: error: candidates are: tuntap::tap::tap(const
tuntap::tap&)
tap(tap const &) = delete;
^
bindings/cpp/tuntap++.cc:86:1: error: tuntap::tap::tap()
tap::tap()
^
*** [CMakeFiles/tuntap++.dir/bindings/cpp/tuntap++.cc.o] Error code 1
> +PORTNAME= libtuntap
^^^^^^^^^^^^ - 2 tabs
> +PORTVERSION= 2.1
^ - 1 tab
Inconsistent whitespace. Adjust your editor to tab width 8 (if not default)
then reindent.
> +CATEGORIES= devel
^^^^^
Why not under net/ ? I don't think tun/tap devices can be used for
non-networking purposes.
> +COMMENT= Library for configuring TUN or TAP devices in a portable manner
^^^^^^^^^^^
Try to avoid redundant words for concise description e.g., "Library for" is
already evident from the port name.
> +USE_GITHUB= yes
Don't forget to populate WWW field in pkg-descr, pointing to the project page
on GitHub.
> +GH_ACCOUNT= m0khi
Repos on GitHub share commit objects for all forks. GH_ACCOUNT=LaKabane would
work as well.
> +GH_TAGNAME= 6182ddf
Better use DISTVERSIONSUFFIX instead for better package version e.g.,
$ git describe 6182ddf
libtuntap-0.3-22-g6182ddf
turns into
DISTVERSION= 0.3-22
DISTVERSIONSUFFIX= -g6182ddf
which is actually
$ make -V PKGVERSION
0.3.22
> +BUILD_DEPENDS= cmake>=2.8:devel/cmake
cmake>=2.8 dates back to 2009-11-29. Do you expect the port to work on an even
older tree? If not, drop the line.
> +OPTIONS_DEFINE+= CXX_WRPR RGRSS_TEST
If you don't plan to have slave ports alter the value replace '+=' with '='.
> +RGRSS_TEST_DESC= Build Regression tests for libtuntap
Better use common TEST_DESC (defined in Mk/bsd.options.desc.mk) instead i.e.,
rename the option. TEST is also enabled by default if you have DEVELOPER=yes in
make.conf.
> +CMAKE_BUILD_TYPE= Release
This is already the default value.
> +CXX_WRPR_CMAKE_ON= -DENABLE_CXX=ON
> +RGRSS_TEST_CMAKE_ON= -DENABLE_REGRESS=ON
^^^
Convert to _CMAKE_BOOL option helper.
> +CXX_WRPR_USE+= compiler:c++11-lib
^^
Most option helpers already append value, so '=' would work fine as well. I
guess, it's just a typo, otherwise CXX_WRPR=on build would still use GCC 4.2.1
on FreeBSD 9.x systems.
> +.include <bsd.port.options.mk>
> +
> +check: build
> +.if ${PORT_OPTIONS:MRGRSS_TEST}
> + @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} test)
> +.endif
Convert to TEST_TARGET, see /usr/ports/CHANGES from 20150928. To hook poudriere
you may also need
# XXX https://github.com/freebsd/poudriere/pull/355
pre-install-TEST-on: do-test
unless some tests are expected to fail e.g., due to lack of permissions.
> +CXX_WRPR_DESC= Build CXX wrapper for libtuntap
> +CXX_WRPR_CMAKE_ON= -DENABLE_CXX=ON
> +CXX_WRPR_USE+= compiler:c++11-lib
[...]
> ++ if(ENABLE_CXX)
> ++ install(TARGETS tuntap++ DESTINATION lib)
> ++ install(TARGETS tuntap++-static DESTINATION lib)
> ++ install(FILES bindings/cpp/tuntap++.hh DESTINATION include)
> ++ endif(ENABLE_CXX)
Maybe move to a slave port instead. That way libtuntap consumers can be sure
its C++ wrapper is always avaliable from a specific port. For example,
# master Makefile
COMMENT?= Configure TUN or TAP devices in a portable manner
...
OPTIONS_EXCLUDE?= CXX_WRPR
# master pkg-plist
%%NO_CXX_WRPR%%include/tuntap.h
...
# slave Makefile
PKGNAMESUFFIX= -c++
COMMENT= C++ wrapper for libtuntap
LIB_DEPENDS= libtuntap.so:devel/libtuntap
MASTERDIR= ${.CURDIR}/../libtuntap
OPTIONS_SLAVE= CXX_WRPR
OPTIONS_EXCLUDE= # clear CXX_WRPR in master
.include "${MASTERDIR}/Makefile"
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list