aboutsummaryrefslogtreecommitdiffstats
path: root/editors/lfhex
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-11-05 18:16:11 +0800
committermiwi <miwi@FreeBSD.org>2007-11-05 18:16:11 +0800
commit0f49b35dd8cae6c6863b028d4220be16d6ebb3a7 (patch)
tree4e101e21919b7c976bdc9025711ca9cde36dccef /editors/lfhex
parentcabe5a248ec8b6e47d99302e7897b9e13a0ea314 (diff)
downloadfreebsd-ports-gnome-0f49b35dd8cae6c6863b028d4220be16d6ebb3a7.tar.gz
freebsd-ports-gnome-0f49b35dd8cae6c6863b028d4220be16d6ebb3a7.tar.zst
freebsd-ports-gnome-0f49b35dd8cae6c6863b028d4220be16d6ebb3a7.zip
- Fix build with gcc 4.2
PR: 117801 Submitted by: Pietro Cerutti <gahr@gahr.ch> Approved by: portmgr (pav)
Diffstat (limited to 'editors/lfhex')
-rw-r--r--editors/lfhex/Makefile6
-rw-r--r--editors/lfhex/files/patch-src-mappings.h29
2 files changed, 32 insertions, 3 deletions
diff --git a/editors/lfhex/Makefile b/editors/lfhex/Makefile
index ba07b73fe76f..e1df23121ecf 100644
--- a/editors/lfhex/Makefile
+++ b/editors/lfhex/Makefile
@@ -34,10 +34,10 @@ PLIST_FILES= bin/lfhex
.include <bsd.port.pre.mk>
+post-patch:
.if ${OSVERSION} >= 700042
-.if ${ARCH} == "i386"
-BROKEN= Does not compile with GCC 4.2
-.endif
+ ${REINPLACE_CMD} -e 's|abs|llabs|g' \
+ ${WRKSRC}/src/reader.cpp
.endif
.include <bsd.port.post.mk>
diff --git a/editors/lfhex/files/patch-src-mappings.h b/editors/lfhex/files/patch-src-mappings.h
new file mode 100644
index 000000000000..f78cf1ee2f10
--- /dev/null
+++ b/editors/lfhex/files/patch-src-mappings.h
@@ -0,0 +1,29 @@
+--- src/mappings.h.orig 2005-09-24 22:44:32.000000000 +0200
++++ src/mappings.h 2007-11-04 20:34:59.000000000 +0100
+@@ -12,7 +12,7 @@
+ /* automatically generated mappings from gen*To*Map.pl scripts */
+
+ namespace TranslationTables {
+- char * byteToBinaryMap[256] = {
++ const char * byteToBinaryMap[256] = {
+ "00000000", "00000001", "00000010", "00000011", "00000100", "00000101",
+ "00000110", "00000111", "00001000", "00001001", "00001010", "00001011",
+ "00001100", "00001101", "00001110", "00001111", "00010000", "00010001",
+@@ -85,7 +85,7 @@
+ '.','.','.','.','.','.','.','.','.','.',
+ '.','.','.','.','.','.',
+ };
+- char * byteToHexMap[256] = {
++ const char * byteToHexMap[256] = {
+ "00", "01", "02", "03", "04", "05", "06", "07", "08", "09",
+ "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13",
+ "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d",
+@@ -113,7 +113,7 @@
+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9",
+ "fa", "fb", "fc", "fd", "fe", "ff",
+ };
+- char * byteToOctalMap[256] = {
++ const char * byteToOctalMap[256] = {
+ "000", "001", "002", "003", "004", "005", "006", "007", "010", "011",
+ "012", "013", "014", "015", "016", "017", "020", "021", "022", "023",
+ "024", "025", "026", "027", "030", "031", "032", "033", "034", "035",