From 04964dfae7e113acdff0f0a77b71000daae29f7a Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Tue, 22 Dec 2009 11:25:12 +0000 Subject: - Update MASTER_SITES - Add OPTIONS to build with gtk2 PR: 141813 Submitted by: Ports Fury --- converters/gbase/Makefile | 35 +++++++++++++++++++++++++++++------ converters/gbase/files/patch-Makefile | 22 ---------------------- converters/gbase/pkg-descr | 2 +- 3 files changed, 30 insertions(+), 29 deletions(-) delete mode 100644 converters/gbase/files/patch-Makefile (limited to 'converters') 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 + +.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 +.include 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/ -- cgit v1.2.3