mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
Patch for antiword, from GCI2012 student Piotr. Fixes #679
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
DESCRIPTION="antiword is a free MS Word reader."
|
||||
HOMEPAGE="http://www.winfield.demon.nl"
|
||||
DESCRIPTION="Converts MS Word files to text and ps"
|
||||
HOMEPAGE="http://www.winfield.demon.nl/#Programmer"
|
||||
SRC_URI="http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
@@ -7,15 +7,13 @@ DEPEND=""
|
||||
CHECKSUM_MD5="f868e2a269edcbc06bf77e89a55898d1"
|
||||
BUILD {
|
||||
cd antiword-0.37
|
||||
make
|
||||
make --makefile Makefile.haiku
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd antiword-0.37
|
||||
make global_install DESTDIR=${DESTDIR} \
|
||||
GLOBAL_INSTALL_DIR=`finddir B_COMMON_BIN_DIRECTORY` \
|
||||
GLOBAL_RESOURCES_DIR=`finddir B_COMMON_DATA_DIRECTORY`/antiword
|
||||
|
||||
make --makefile Makefile.haiku global_install
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="1998-2005 A.J. van Os"
|
||||
|
||||
116
app-text/antiword/patches/antiword-0.37.patch
Normal file
116
app-text/antiword/patches/antiword-0.37.patch
Normal file
@@ -0,0 +1,116 @@
|
||||
diff -Naur antiword-0.37/antiword.h antiword-0.37-haiku/antiword.h
|
||||
--- antiword-0.37/antiword.h 2005-07-06 17:46:22.000000000 +0000
|
||||
+++ antiword-0.37-haiku/antiword.h 2012-12-27 19:30:23.169607168 +0000
|
||||
@@ -211,6 +211,10 @@
|
||||
#define GLOBAL_ANTIWORD_DIR "/boot/home/config/apps/antiword"
|
||||
#define ANTIWORD_DIR "antiword"
|
||||
#define FONTNAMES_FILE "fontnames"
|
||||
+#elif defined(__haiku)
|
||||
+#define GLOBAL_ANTIWORD_DIR "/boot/common/data/antiword"
|
||||
+#define ANTIWORD_DIR "antiword"
|
||||
+#define FONTNAMES_FILE "fontnames"
|
||||
#elif defined(__CYGMING__)
|
||||
#define GLOBAL_ANTIWORD_DIR "C:\\antiword"
|
||||
#define ANTIWORD_DIR "antiword"
|
||||
diff -Naur antiword-0.37/Makefile.haiku antiword-0.37-haiku/Makefile.haiku
|
||||
--- antiword-0.37/Makefile.haiku 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ antiword-0.37-haiku/Makefile.haiku 2012-12-27 19:14:41.153092096 +0000
|
||||
@@ -0,0 +1,97 @@
|
||||
+#
|
||||
+# Makefile for antiword (Haiku version)
|
||||
+#
|
||||
+
|
||||
+CC = gcc
|
||||
+LD = gcc
|
||||
+
|
||||
+INSTALL = cp -f
|
||||
+INSTALL_PROGRAM = $(INSTALL)
|
||||
+INSTALL_DATA = $(INSTALL)
|
||||
+
|
||||
+# must be equal to DEBUG or NDEBUG
|
||||
+DB = DEBUG
|
||||
+# Optimization: -O<n> or debugging: -g
|
||||
+OPT = -O2
|
||||
+
|
||||
+LDLIBS =
|
||||
+
|
||||
+CFLAGS = -Wall -pedantic $(OPT) -D$(DB) -D__haiku
|
||||
+LDFLAGS =
|
||||
+
|
||||
+OBJS =\
|
||||
+ main_u.o asc85enc.o blocklist.o chartrans.o datalist.o depot.o\
|
||||
+ dib2eps.o doclist.o fail.o finddata.o findtext.o fmt_text.o fontlist.o\
|
||||
+ fonts.o fonts_u.o hdrftrlist.o imgexam.o imgtrans.o jpeg2eps.o\
|
||||
+ listlist.o misc.o notes.o options.o out2window.o output.o pdf.o\
|
||||
+ pictlist.o png2eps.o postscript.o prop0.o prop2.o prop6.o prop8.o\
|
||||
+ properties.o propmod.o rowlist.o sectlist.o stylelist.o stylesheet.o\
|
||||
+ summary.o tabstop.o text.o unix.o utf8.o word2text.o worddos.o\
|
||||
+ wordlib.o wordmac.o wordole.o wordwin.o xmalloc.o xml.o
|
||||
+
|
||||
+PROGS =\
|
||||
+ antiword\
|
||||
+ kantiword
|
||||
+
|
||||
+LOCAL_INSTALL_DIR = $(HOME)/bin
|
||||
+LOCAL_RESOURCES_DIR = $(HOME)/.antiword
|
||||
+
|
||||
+GLOBAL_INSTALL_DIR = /boot/common/bin
|
||||
+GLOBAL_RESOURCES_DIR = /boot/common/data/antiword
|
||||
+
|
||||
+all: $(PROGS)
|
||||
+
|
||||
+install: all
|
||||
+ mkdir -p $(LOCAL_INSTALL_DIR)
|
||||
+ cp -pf $(PROGS) $(LOCAL_INSTALL_DIR)
|
||||
+ mkdir -p $(LOCAL_RESOURCES_DIR)
|
||||
+# cp -pf Resources/* $(LOCAL_RESOURCES_DIR)
|
||||
+
|
||||
+# NOTE: you might have to be root to do this
|
||||
+global_install: all
|
||||
+# @[ `id -u` -eq 0 ] || (echo "You must be root to do this" && false)
|
||||
+ mkdir -p $(DESTDIR)$(GLOBAL_INSTALL_DIR)
|
||||
+ $(INSTALL_PROGRAM) $(PROGS) $(DESTDIR)$(GLOBAL_INSTALL_DIR)
|
||||
+ cd $(DESTDIR)$(GLOBAL_INSTALL_DIR); chmod 755 $(PROGS)
|
||||
+ mkdir -p $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
|
||||
+ chmod 755 $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
|
||||
+ $(INSTALL_DATA) Resources/*.txt $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
|
||||
+ $(INSTALL_DATA) Resources/fontnames $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
|
||||
+ cd $(DESTDIR)$(GLOBAL_RESOURCES_DIR); chmod 644 *.txt fontnames
|
||||
+
|
||||
+# NOTE: you might have to be root to do this
|
||||
+global_uninstall:
|
||||
+# @[ `id -u` -eq 0 ] || (echo "You must be root to do this" && false)
|
||||
+ cd $(DESTDIR)$(GLOBAL_INSTALL_DIR); rm -f $(PROGS)
|
||||
+ -rmdir $(DESTDIR)$(GLOBAL_INSTALL_DIR)
|
||||
+ cd $(DESTDIR)$(GLOBAL_RESOURCES_DIR); rm -f *.txt fontnames
|
||||
+ -rmdir $(DESTDIR)$(GLOBAL_RESOURCES_DIR)
|
||||
+
|
||||
+clean:
|
||||
+ rm -f $(OBJS)
|
||||
+ rm -f $(PROGS)
|
||||
+
|
||||
+antiword: $(OBJS)
|
||||
+ @rm -f $@
|
||||
+ $(LD) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
|
||||
+ @chmod 750 $@
|
||||
+
|
||||
+kantiword: Unix-only/KDE3-only/kantiword.sh
|
||||
+ @rm -f $@
|
||||
+ echo "#!/bin/bash" > $@
|
||||
+ cat $? >> $@
|
||||
+ @chmod 750 $@
|
||||
+
|
||||
+.c.o:
|
||||
+ $(CC) $(CFLAGS) -c $<
|
||||
+
|
||||
+main_u.o: version.h
|
||||
+postscript.o: version.h
|
||||
+pdf.o: version.h
|
||||
+fonts_u.o: fontinfo.h
|
||||
+
|
||||
+fontinfo.h: Unix-only/fontinfo.h
|
||||
+ cp -rp $? $@
|
||||
+
|
||||
+Unix-only/fontinfo.h: Unix-only/fontinfo.pl
|
||||
+ Unix-only/fontinfo.pl > Unix-only/fontinfo.h
|
||||
|
||||
Reference in New Issue
Block a user