aboutsummaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-12-22 11:25:12 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-12-22 11:25:12 +0000
commit04964dfae7e113acdff0f0a77b71000daae29f7a (patch)
treef2f5edc5c0a4207301577de7f759a9b56e729999 /converters
parenteeeee9253bb1f569cb4eec0918462c0888a5ca14 (diff)
downloadports-04964dfae7e113acdff0f0a77b71000daae29f7a.tar.gz
ports-04964dfae7e113acdff0f0a77b71000daae29f7a.zip
Notes
Diffstat (limited to 'converters')
-rw-r--r--converters/gbase/Makefile35
-rw-r--r--converters/gbase/files/patch-Makefile22
-rw-r--r--converters/gbase/pkg-descr2
3 files changed, 30 insertions, 29 deletions
diff --git a/converters/gbase/Makefile b/converters/gbase/Makefile
index 0173688cbad9..19d2ad8969ea 100644
--- a/converters/gbase/Makefile
+++ b/converters/gbase/Makefile
@@ -7,17 +7,40 @@
PORTNAME= gbase
PORTVERSION= 0.5
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= converters
-MASTER_SITES= http://www.hibernaculum.net/download/
+MASTER_SITES= http://www.fluxcode.net/
MAINTAINER= ports@FreeBSD.org
COMMENT= A program to convert between the 4 common bases used in programming
-PLIST_FILES= bin/gbase
-USE_GNOME= gtk12
+OPTIONS= GTK2 "GTK+-2 support" off
+
+USE_GNOME= pkgconfig
+
+PLIST_FILES= bin/${PORTNAME}
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GTK2)
+USE_GNOME+= gtk12
+GTK_CFLAGS= `pkg-config --cflags gtk+-2.0`
+GTK_LIBS= `pkg-config --libs gtk+-2.0`
+.else
+USE_GNOME+= gtk12
+GTK_CFLAGS= `pkg-config --cflags gtk+`
+GTK_LIBS= `pkg-config --libs gtk+`
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|(i == argc)|(i+1 == argc)|' ${WRKSRC}/${PORTNAME}.c
+
+do-build:
+ cd ${WRKSRC}; ${CC} ${CFLAGS} ${GTK_CFLAGS} ${PORTNAME}.c \
+ -o ${PORTNAME} ${GTK_LIBS}
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/gbase ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/converters/gbase/files/patch-Makefile b/converters/gbase/files/patch-Makefile
deleted file mode 100644
index fa072f196531..000000000000
--- a/converters/gbase/files/patch-Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
---- Makefile.orig Fri Sep 7 22:10:42 2001
-+++ Makefile Fri Sep 7 22:20:26 2001
-@@ -1,6 +1,7 @@
--CC = gcc
--CCFLAGS = `gtk-config --cflags`
--LDFLAGS = `gtk-config --libs`
-+CFLAGS += `${GTK_CONFIG} --cflags`
-+LDFLAGS = `${GTK_CONFIG} --libs`
-+
-+all: gbase
-
- gbase: gbase.o
- $(CC) gbase.o $(LDFLAGS) -o gbase
-@@ -10,6 +11,6 @@
-
- # Make object files:
- %.o:
-- $(CC) $(CCFLAGS) -c $*.c
-+ $(CC) $(CFLAGS) -c $*.c
-
--gbase.o: gbase.c
-+gbase.o: gbase.c
diff --git a/converters/gbase/pkg-descr b/converters/gbase/pkg-descr
index ee9941459637..19e89a7c6273 100644
--- a/converters/gbase/pkg-descr
+++ b/converters/gbase/pkg-descr
@@ -5,4 +5,4 @@ convert numbers entered on the command line. It can correctly handle
both signed and unsigned 32-bit integers.
License: Artistic
-WWW: http://www.hibernaculum.net/gbase/
+WWW: http://www.fluxcode.net/