aboutsummaryrefslogtreecommitdiff
path: root/graphics/libboard
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2018-10-09 12:47:54 +0000
committerThierry Thomas <thierry@FreeBSD.org>2018-10-09 12:47:54 +0000
commit5adc2a7f8f780cc5fc1d5a11fb34e25f0f9368c4 (patch)
treef857e39a2c907dca49c870f7a265fb7255ff540b /graphics/libboard
parent6bb32020e13348ebc0671ad7cf81c8c30a979f9f (diff)
downloadports-5adc2a7f8f780cc5fc1d5a11fb34e25f0f9368c4.tar.gz
ports-5adc2a7f8f780cc5fc1d5a11fb34e25f0f9368c4.zip
Switch to cmake and clang, in order to link with lld.
Reported by: emaste
Notes
Notes: svn path=/head/; revision=481630
Diffstat (limited to 'graphics/libboard')
-rw-r--r--graphics/libboard/Makefile38
-rw-r--r--graphics/libboard/files/patch-CMakeLists.txt13
-rw-r--r--graphics/libboard/files/patch-configure79
-rw-r--r--graphics/libboard/pkg-plist7
4 files changed, 22 insertions, 115 deletions
diff --git a/graphics/libboard/Makefile b/graphics/libboard/Makefile
index e4d5ddbec185..762821e16de5 100644
--- a/graphics/libboard/Makefile
+++ b/graphics/libboard/Makefile
@@ -3,7 +3,7 @@
PORTNAME= libboard
DISTVERSION= 0.9.4
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= graphics
MAINTAINER= thierry@FreeBSD.org
@@ -13,48 +13,28 @@ LICENSE= LGPL3
LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick
-HAS_CONFIGURE= yes
-CXXFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528
-CONFIGURE_ARGS= --prefix=${PREFIX}
-CONFIGURE_ENV= CXX=${CXX}
+USES= cmake compiler:c++11-lang localbase
-USES= gmake
-USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= c-koi
GH_TAGNAME= 5b38274
+CXXFLAGS+= -D_GLIBCXX_USE_C99 -fPIC # XXX ports/193528
+USE_CXXSTD= c++11
+CMAKE_ARGS= -DMYPROJ_RAN_ONCE:BOOL=YES \
+ -DEXECUTABLE_OUTPUT_PATH:PATH="${STAGEDIR}${EXAMPLESDIR}"
+USE_LDCONFIG= yes
+
PORTDOCS= *
OPTIONS_DEFINE= DOXYGEN EXAMPLES DOCS
DOXYGEN_IMPLIES= DOCS
DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} != i386
-CXXFLAGS+= -fPIC
-.endif
-
-pre-configure:
- ${REINPLACE_CMD} -e 's|-O3|${CXXFLAGS}|;s|g++|${CXX}|' \
- ${WRKSRC}/${CONFIGURE_SCRIPT}
-
post-install:
${MV} ${STAGEDIR}${PREFIX}/lib/libboard.so ${STAGEDIR}${PREFIX}/lib/libboard.so.0
${LN} -sf libboard.so.0 ${STAGEDIR}${PREFIX}/lib/libboard.so
-post-install-DOXYGEN-on:
- ${MKDIR} ${STAGEDIR}${DOCSDIR}
- cd ${WRKSRC}/doc/html/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/
- ${RM} -r ${STAGEDIR}${DOCSDIR}/.svn
-
-post-install-EXAMPLES-on:
- ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/
- cd ${WRKSRC}/bin/ && ${COPYTREE_BIN} . ${STAGEDIR}${EXAMPLESDIR}/
- ${RM} -r ${STAGEDIR}${EXAMPLESDIR}/.svn
-
do-test:
(cd ${WRKDIR} && ${WRKSRC}/bin/arithmetic bec)
.for ex in 1 2 3
@@ -62,4 +42,4 @@ do-test:
.endfor
${LS} -l ${WRKDIR}/arithm* ${WRKDIR}/example*
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/libboard/files/patch-CMakeLists.txt b/graphics/libboard/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..2b9069b5d1f3
--- /dev/null
+++ b/graphics/libboard/files/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+--- CMakeLists.txt.orig 2016-06-09 17:30:46 UTC
++++ CMakeLists.txt
+@@ -149,8 +149,8 @@ install(DIRECTORY include/ DESTINATION i
+ install(DIRECTORY include/board/ DESTINATION include/board FILES_MATCHING PATTERN "*.h")
+ install(TARGETS board DESTINATION lib)
+ install(TARGETS board-dynamic DESTINATION lib)
+-install(DIRECTORY examples/ DESTINATION share/libboard/examples FILES_MATCHING PATTERN "*.cpp")
+-install(FILES README.md LICENSE AUTHORS DESTINATION share/libboard )
++install(DIRECTORY examples/ DESTINATION share/examples/libboard FILES_MATCHING PATTERN "*.cpp")
++install(FILES README.md LICENSE AUTHORS DESTINATION share/doc/libboard )
+
+ FOREACH( EXAMPLE logo example1 example2 example3 example4
+ arithmetic ellipse graph arrows ruler koch clipping
diff --git a/graphics/libboard/files/patch-configure b/graphics/libboard/files/patch-configure
deleted file mode 100644
index e609575aa973..000000000000
--- a/graphics/libboard/files/patch-configure
+++ /dev/null
@@ -1,79 +0,0 @@
---- configure.orig 2016-06-09 17:30:46 UTC
-+++ configure
-@@ -163,23 +163,6 @@ fi
- ##
- ## Are we on a 64 bits arch
- ##
--${ECHO} -n "Checking for 64 bits architecture..."
--cat > is64.c <<EOF
--int main() {
-- unsigned long n = 0;
-- n = ~n;
-- return n == 0xFFFFFFFF;
--}
--EOF
--gcc -o is64 is64.c
--if ./is64; then
--CXX64FLAGS="-fPIC"
--echo yes
--else
--CXX64FLAGS=""
--echo no
--fi
--rm -f is64 is64.c
-
-
- #
-@@ -204,7 +187,7 @@ DYNLIB_NAME=\$(LIBNAME).\$(DYNLIB_EXTENS
- STATICLIB_NAME=\$(LIBNAME).\$(STATICLIB_EXTENSION)
- DYNLIB=lib/\$(DYNLIB_NAME)
- STATICLIB=lib/\$(STATICLIB_NAME)
--PREFIX=$PREFIX
-+PREFIX=\$(DESTDIR)$PREFIX
- RM=rm -f
- CP=cp
- LD=\$(CXX)
-@@ -231,6 +214,7 @@ ${ECHO} -n "Checking plateform..."
- WIN32=0
- case $(uname) in
- Linux ) WIN32=0; PLATEFORM=Linux ;;
-+ FreeBSD ) WIN32=0; PLATEFORM=FreeBSD ;;
- Darwin) WIN32=0; PLATEFORM="Mac OS X" ;;
- Darwin ) WIN32=0; PLATEFORM="Mac OS X" ;;
- MINGW* ) WIN32=1; PLATEFORM="Win32/Mingw" ;;
-@@ -241,7 +225,7 @@ ${ECHO} $PLATEFORM
- ${ECHO} -n "Creating include/BoardConfig.h..."
- sed -e 's/@Board_Have_MagickPlusPlus@/'${MAGICKPLUSPLUS}'/' \
- -e 's/@Board_Win32@/'${WIN32}'/' \
-- -e 's/@LibBoard_VERSION@/'${VERSION}'/' \
-+ -e "s/@LibBoard_VERSION@/'${VERSION}'/" \
- include/BoardConfig.h.in > include/BoardConfig.h
- ${ECHO} "done."
-
-@@ -269,6 +253,7 @@ obj/Board.o: src/Board.cpp include/Board
-
- bin/%: examples/%.cpp \$(STATICLIB)
- \$(CXX) \$(CXXFLAGSEXEC) -o \$@ \$< ${IMAGE_CXXFLAGS} ${IMAGE_LDFLAGS} \$(STATICLIB)
-+ \strip \$@
-
- clean:
- rm -f obj/*.o lib/* bin/* include/*~ include/board/*~ src/*~ examples/*~ *~
-@@ -292,7 +277,6 @@ if [ ${ON_PLACE} = no ]; then
- \$(CP) include/BoardConfig.h \$(PREFIX)/include/
- \$(CP) include/board/*.h \$(PREFIX)/include/board
- \$(CP) include/board/*.ih \$(PREFIX)/include/board
-- ldconfig
- EOF
- fi
- cat >> Makefile <<EOF
-@@ -300,10 +284,6 @@ cat >> Makefile <<EOF
- chmod 644 \$(PREFIX)/include/Board.h
- chmod 644 \$(PREFIX)/include/board/*.h
- chmod 644 \$(PREFIX)/include/board/*.ih
-- install -d \$(PREFIX)/share/libboard/examples
-- \$(CP) examples/*.cpp \$(PREFIX)/share/libboard/examples
-- \$(CP) examples/README \$(PREFIX)/share/libboard/examples
-- \$(CP) ${LICENSE} \$(PREFIX)/share/libboard/
-
- doc: doc/html/index.html
-
diff --git a/graphics/libboard/pkg-plist b/graphics/libboard/pkg-plist
index 171c527fe4da..3dba5ff557e9 100644
--- a/graphics/libboard/pkg-plist
+++ b/graphics/libboard/pkg-plist
@@ -1,6 +1,5 @@
include/Board.h
include/BoardConfig.h
-include/board/Board.ih
include/board/Color.h
include/board/Image.h
include/board/PSFonts.h
@@ -9,20 +8,14 @@ include/board/PathBoundaries.h
include/board/Point.h
include/board/Rect.h
include/board/ShapeList.h
-include/board/ShapeList.ih
include/board/ShapeVisitor.h
include/board/Shapes.h
-include/board/Shapes.ih
include/board/Tools.h
-include/board/Tools.ih
include/board/TransformMatrix.h
-include/board/TransformMatrix.ih
include/board/Transforms.h
-include/board/Transforms.ih
lib/libboard.a
lib/libboard.so
lib/libboard.so.0
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arithmetic
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arithmetic.cpp
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/arrows