- Fix building.

This commit is contained in:
Alejandro Pulver 2006-08-03 23:53:41 +00:00
parent d52bfb13aa
commit 231c94edfb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=169605
3 changed files with 54 additions and 15 deletions

View file

@ -14,14 +14,11 @@ DISTNAME= ${PORTNAME}${PORTVERSION:S/.//g}
MAINTAINER= alepulver@FreeBSD.org
COMMENT= A 2D graphics library
BROKEN= does not build
USE_GMAKE= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-fontpath=${DATADIR}/fonts
CONFIGURE_TARGET=
USE_XLIB= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --with-fontpath=${DATADIR}/fonts
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
ALL_TARGET= libs
@ -42,8 +39,10 @@ INFO= grx
.if defined(WITH_BGI)
CONFIGURE_ARGS+=--enable-bgi
PLIST_SUB+= BGI=""
.else
CONFIGURE_ARGS+=--disable-bgi
PLIST_SUB+= BGI="@comment "
.endif
.if defined(WITH_BMP)
@ -54,13 +53,17 @@ CONFIGURE_ARGS+=--disable-bmp
.if defined(WITH_GPC)
RUN_DEPENDS+= gpc:${PORTSDIR}/lang/gpc
PLIST_SUB+= GPC=""
GCC_VER!= cd ${PORTSDIR}/lang/gpc && ${MAKE} -V GCC_VER
GNU_HOST!= cd ${PORTSDIR}/lang/gpc && ${MAKE} -V GNU_HOST
PLIST_SUB+= GPC="" \
GCC_VER="${GCC_VER}" \
GNU_HOST="${GNU_HOST}"
.else
PLIST_SUB+= GPC=""
PLIST_SUB+= GPC="@comment "
.endif
.if defined(WITH_JPEG)
LIB_DEPENDS+= jpeg.9${PORTSDIR}/graphics/jpeg
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
CONFIGURE_ARGS+=--enable-jpeg
.else
CONFIGURE_ARGS+=--disable-jpeg
@ -82,7 +85,7 @@ PLIST_SUB+= PRINT="@comment "
.endif
.if defined(WITH_TIFF)
LIB_DEPENDS+= tiff.4${PORTSDIR}/graphics/tiff
LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
CONFIGURE_ARGS+=--enable-tiff
.else
CONFIGURE_ARGS+=--disable-tiff
@ -106,10 +109,12 @@ post-patch:
post-install:
.if defined(WITH_GPC)
${INSTALL_DATA} ${WRKSRC}/pascal/grx.pas ${PREFIX}/lib/gpc/units
${INSTALL_DATA} ${WRKSRC}/pascal/grx.pas \
${PREFIX}/lib/gpc/gcc/${GNU_HOST}/${GCC_VER}/units
.if defined(WITH_BGI)
${INSTALL_DATA} ${WRKSRC}/pascal/bgi/graph.pas \
${PREFIX}/lib/gpc/gcc/${GNU_HOST}/${GCC_VER}/units
.endif
.if defined(WITH_GPC) && defined(WITH_BGI)
${INSTALL_DATA} ${WRKSRC}/pascal/bgi/graph.pas ${PREFIX}/lib/gpc/units
.endif
.include <bsd.port.post.mk>

View file

@ -0,0 +1,34 @@
--- src/include/libgrx.h.orig Sun Mar 4 17:45:26 2001
+++ src/include/libgrx.h Thu Aug 3 20:43:31 2006
@@ -132,6 +132,9 @@
/*
** get system endian
*/
+#include <machine/endian.h>
+
+#if 0
#if !defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
# if defined(__TURBOC__) \
|| defined(__WATCOMC__) \
@@ -144,7 +147,9 @@
# include <sys/byteorder.h>
# endif
#endif
+#endif
+#if 0
#if defined(__BYTE_ORDER__) && !defined(BYTE_ORDER)
# define BYTE_ORDER __BYTE_ORDER__
# define LITTLE_ENDIAN __LITTLE_ENDIAN__
@@ -163,6 +168,11 @@
#ifndef BYTE_ORDER
#error Unknown byte ordering !
#endif
+#endif
+
+#define BYTE_ORDER _BYTE_ORDER
+#define LITTLE_ENDIAN _LITTLE_ENDIAN
+#define BIG_ENDIAN _BIG_ENDIAN
#ifndef HARDWARE_BYTE_ORDER
#define HARDWARE_BYTE_ORDER BYTE_ORDER

View file

@ -5,8 +5,8 @@ include/grx20.h
include/grxkeys.h
%%PRINT%%include/grxprint.h
include/libbcc.h
%%GPC%%%%BGI%%lib/gpc/units/graph.pas
%%GPC%%lib/gpc/units/grx.pas
%%GPC%%%%BGI%%lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/units/graph.pas
%%GPC%%lib/gpc/gcc/%%GNU_HOST%%/%%GCC_VER%%/units/grx.pas
lib/libgrx20X.a
lib/libgrx20X.so
lib/libgrx20X.so.2