- Update print/gl2ps to 1.4.0.

- Use upstream build system so the static library is no longer built with
  -fPIC, the shared library gets a proper version and SONAME, and flags
  like LDFLAGS are respected.
- Drop dependency on libGLU and Xorg libraries.
- Add LICENSE.
- Update pkg-descr.

PR:		223204
Approved by:	maintainer timeout (2 weeks)
This commit is contained in:
Tijl Coosemans 2017-11-07 17:12:06 +00:00
parent 7380d4d27b
commit 4b974739d5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=453669
7 changed files with 56 additions and 68 deletions

View File

@ -2,41 +2,23 @@
# $FreeBSD$
PORTNAME= gl2ps
PORTVERSION= 1.3.9
PORTREVISION= 2
PORTVERSION= 1.4.0
CATEGORIES= print graphics
MASTER_SITES= http://www.geuz.org/gl2ps/src/
EXTRACT_SUFX= .tgz
MAINTAINER= araujo@FreeBSD.org
COMMENT= C library providing vector output for OpenGL application
COMMENT= C library providing vector output for OpenGL applications
USE_GL= yes
USE_XORG= x11 xmu xi
LICENSE= LGPL20+
LICENSE_FILE= ${WRKSRC}/COPYING.LGPL
LIB_DEPENDS= libpng.so:graphics/png
USES= cmake:outsource tar:tgz
USE_GL= gl
USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-source
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-source
OPTIONS_DEFINE= DOCS
pre-build:
@${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/libgl2ps.so ${STAGEDIR}${PREFIX}/lib
${LN} -s {PREFIX}/lib/libgl2ps.so ${STAGEDIR}${PREFIX}/lib/libgl2ps.so.1
${INSTALL_DATA} ${WRKSRC}/libgl2ps.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/gl2ps.h ${STAGEDIR}${PREFIX}/include
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/gl2psTest.c ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/gl2psTestSimple.c ${STAGEDIR}${EXAMPLESDIR}
@${SED} -e 's|%%CC%%|${CC}|g; \
s|%%RM%%|${RM}|g; \
s|%%CFLAGS%%|${CFLAGS}|g; \
s|%%LOCALBASE%%|${LOCALBASE}|g' \
<${FILESDIR}/Makefile.ex >${STAGEDIR}${EXAMPLESDIR}/Makefile
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/gl2ps.pdf ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (gl2ps-1.3.9.tgz) = 8a680bff120df8bcd78afac276cdc38041fed617f2721bade01213362bcc3640
SIZE (gl2ps-1.3.9.tgz) = 294907
TIMESTAMP = 1508834464
SHA256 (gl2ps-1.4.0.tgz) = 03cb5e6dfcd87183f3b9ba3b22f04cd155096af81e52988cc37d8d8efe6cf1e2
SIZE (gl2ps-1.4.0.tgz) = 300339

View File

@ -1,19 +0,0 @@
# You'll need graphics/libglut in order to build example programs
CC=%%CC%%
RM=%%RM%%
CFLAGS= %%CFLAGS%% -DHAVE_ZLIB -O3 -I%%LOCALBASE%%/include
LDFLAGS= -lgl2ps -lGL -lGLU -lglut -L%%LOCALBASE%%/lib -lX11 -lXi -lXmu -lm -lz
gl2psTest: gl2psTest.o
${CC} ${LDFLAGS} $> -o $@
gl2psTestSimple: gl2psTestSimple.o
${CC} ${LDFLAGS} $> -o $@
.c.o:
${CC} -c ${CFLAGS} $*.c
clean:
${RM} -f gl2psTest gl2psTest.o gl2psTestSimple gl2psTestSimple.o

View File

@ -1,13 +0,0 @@
CFLAGS+= -DHAVE_ZLIB -O3 -fPIC -I${LOCALBASE}/include
LDFLAGS= -shared -E -lGL -L${LOCALBASE}/lib -L/usr/lib -lX11 -lXi -lXmu -lm -lz
all: libgl2ps.so libgl2ps.a
libgl2ps.a: gl2ps.o
${AR} qc $@ $>
libgl2ps.so: gl2ps.o
${LD} ${LDFLAGS} $> -o $@
.c.o:
${CC} -c ${CFLAGS} $*.c

View File

@ -0,0 +1,32 @@
--- CMakeLists.txt.orig 2017-04-03 23:09:28 UTC
+++ CMakeLists.txt
@@ -79,10 +79,9 @@ endif(NOT HAVE_VSNPRINTF)
find_package(OpenGL)
if(OPENGL_FOUND)
list(APPEND EXTERNAL_INCLUDES ${OPENGL_INCLUDE_DIR})
- list(APPEND EXTERNAL_LIBRARIES ${OPENGL_LIBRARIES})
+ list(APPEND EXTERNAL_LIBRARIES ${OPENGL_gl_LIBRARY})
endif(OPENGL_FOUND)
-find_package(GLUT)
if(GLUT_FOUND)
list(APPEND EXTERNAL_INCLUDES ${GLUT_INCLUDE_DIR})
list(APPEND EXTERNAL_LIBRARIES ${GLUT_LIBRARIES})
@@ -138,8 +137,7 @@ endif(WIN32)
install(FILES gl2ps.h DESTINATION include)
install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC})
-install(FILES ${CMAKE_SOURCE_DIR}/COPYING.LGPL DESTINATION ${GL2PS_DOC})
-install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC})
+install(FILES ${CMAKE_SOURCE_DIR}/gl2ps.pdf DESTINATION ${GL2PS_DOC})
install(FILES ${CMAKE_SOURCE_DIR}/gl2psTest.c DESTINATION ${GL2PS_DOC})
install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC})
@@ -150,7 +148,6 @@ if(GLUT_FOUND)
target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES})
endif(GLUT_FOUND)
-find_package(LATEX)
if(PDFLATEX_COMPILER)
add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex
COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex

View File

@ -5,8 +5,12 @@ stretched polygons, as well as non manifold objects. GL2PS provides advanced
smooth shading and text rendering, culling of invisible primitives, mixed
vector/bitmap output, and much more...
GL2PS can currently create PostScript (PS), Encapsulated PostScript (EPS)
and Portable Document Format (PDF) files, as well as LATEX files for the
text fragments.
GL2PS can currently create PostScript (PS), Encapsulated PostScript (EPS),
Portable Document Format (PDF) and Scalable Vector Graphics (SVG) files, as
well as LATEX files for the text fragments. GL2PS also provides limited,
experimental support for Portable LaTeX Graphics (PGF). Adding new vector
output formats should be relatively easy; you can also use the excellent
pstoedit program to transform the PostScript files generated by GL2PS into
many other vector formats such as xfig, cgm, wmf, etc.
WWW: http://www.geuz.org/gl2ps/

View File

@ -2,7 +2,8 @@ include/gl2ps.h
lib/libgl2ps.a
lib/libgl2ps.so
lib/libgl2ps.so.1
%%EXAMPLESDIR%%/gl2psTest.c
%%EXAMPLESDIR%%/gl2psTestSimple.c
%%EXAMPLESDIR%%/Makefile
lib/libgl2ps.so.1.4.0
%%PORTDOCS%%%%DOCSDIR%%/README.txt
%%PORTDOCS%%%%DOCSDIR%%/gl2ps.pdf
%%PORTDOCS%%%%DOCSDIR%%/gl2psTest.c
%%PORTDOCS%%%%DOCSDIR%%/gl2psTestSimple.c