aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/gdisk
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2015-01-28 23:36:11 +0800
committerwg <wg@FreeBSD.org>2015-01-28 23:36:11 +0800
commitcfa7a9af811525cf1dfd43ea83ad43f896871144 (patch)
tree773e45950a8d9298806be68d13ded6336c0e4b40 /sysutils/gdisk
parent38b5a04178e43860e9c4924ccc1ad1f834e896ce (diff)
downloadfreebsd-ports-gnome-cfa7a9af811525cf1dfd43ea83ad43f896871144.tar.gz
freebsd-ports-gnome-cfa7a9af811525cf1dfd43ea83ad43f896871144.tar.zst
freebsd-ports-gnome-cfa7a9af811525cf1dfd43ea83ad43f896871144.zip
sysutils/gdisk: fix build with utf16 option
PR: 197006 Submitted by: John Hein (based on)
Diffstat (limited to 'sysutils/gdisk')
-rw-r--r--sysutils/gdisk/Makefile12
-rw-r--r--sysutils/gdisk/files/patch-Makefile.freebsd35
2 files changed, 35 insertions, 12 deletions
diff --git a/sysutils/gdisk/Makefile b/sysutils/gdisk/Makefile
index 40c3f1833260..925db36b5ed2 100644
--- a/sysutils/gdisk/Makefile
+++ b/sysutils/gdisk/Makefile
@@ -23,7 +23,11 @@ OPTIONS_DEFINE= CGDISK UTF16
OPTIONS_SUB= yes
CGDISK_DESC= Curses-based interactive program
UTF16_DESC= Support for Unicode partition names
+UTF16_CPPFLAGS+= -DUSE_UTF16
+UTF16_LDFLAGS+= -licuio
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
MAKEFILE= Makefile.freebsd
PROGRAM_LIST= fixparts gdisk sgdisk
@@ -40,18 +44,10 @@ LIB_DEPENDS+= libicuuc.so:${PORTSDIR}/devel/icu
.endif
post-patch:
- ${REINPLACE_CMD} -e 's|/usr/include/||' ${WRKSRC}/guid.h
- ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/${MAKEFILE}
-
.if ! ${PORT_OPTIONS:MCGDISK}
${REINPLACE_CMD} -e '/^all:/s| cgdisk||' ${WRKSRC}/${MAKEFILE}
.endif
-.if ! ${PORT_OPTIONS:MUTF16}
- ${REINPLACE_CMD} -e 's| -D USE_UTF16||' \
- -e 's| -licuio||' ${WRKSRC}/${MAKEFILE}
-.endif
-
do-install:
.for i in ${PROGRAM_LIST}
${INSTALL_PROGRAM} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/sbin
diff --git a/sysutils/gdisk/files/patch-Makefile.freebsd b/sysutils/gdisk/files/patch-Makefile.freebsd
index 6bab95cebbfb..6090f056575e 100644
--- a/sysutils/gdisk/files/patch-Makefile.freebsd
+++ b/sysutils/gdisk/files/patch-Makefile.freebsd
@@ -1,10 +1,37 @@
--- Makefile.freebsd 2011-09-11 00:51:13.000000000 +0000
-+++ Makefile.freebsd 2011-09-18 20:22:41.000000000 +0000
-@@ -1,5 +1,5 @@
++++ Makefile.freebsd 2015-01-22 02:35:12.000000000 -0700
+@@ -1,8 +1,8 @@
-CC=gcc
-CXX=g++
+CC?=gcc
+CXX?=g++
CFLAGS+=-D_FILE_OFFSET_BITS=64
- CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/usr/local/include
- #CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include
+ #CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/usr/local/include
+-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include
++CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 ${CPPFLAGS}
+ LDFLAGS+=
+ LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
+ MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
+@@ -15,18 +15,18 @@
+
+ gdisk: $(LIB_OBJS) gdisk.o gpttext.o
+ # $(CXX) $(LIB_OBJS) gdisk.o gpttext.o -L/usr/local/lib $(LDFLAGS) -licuio -luuid -o gdisk
+- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o -L/usr/local/lib $(LDFLAGS) -luuid -o gdisk
++ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
+
+ cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
+ # $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o -L/usr/local/lib $(LDFLAGS) -licuio -luuid -lncurses -o cgdisk
+- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o -L/usr/local/lib $(LDFLAGS) -luuid -lncurses -o cgdisk
++ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
+
+ sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
+ # $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o -L/usr/local/lib $(LDFLAGS) -luuid -licuio -lpopt -o sgdisk
+- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o -L/usr/local/lib $(LDFLAGS) -luuid -lpopt -o sgdisk
++ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
+
+ fixparts: $(MBR_LIB_OBJS) fixparts.o
+- $(CXX) $(MBR_LIB_OBJS) fixparts.o -L/usr/local/lib $(LDFLAGS) -o fixparts
++ $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
+
+ lint: #no pre-reqs
+ lint $(SRCS)