Skip to content

Instantly share code, notes, and snippets.

@floren
Created March 6, 2017 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floren/d73247973492e19a1fb8fcedabe293af to your computer and use it in GitHub Desktop.
Save floren/d73247973492e19a1fb8fcedabe293af to your computer and use it in GitHub Desktop.
Compiling ghostscript
Grab the latest ghostscript source
Unpack
./configure && make # You can control-C after a few seconds
cp ./obj/arch.h obj/harvey-arch.h
Edit Makefile.in and modify the following variables as such:
EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ ${APEX}/amd64/lib/crt1.o ${APEX}/amd64/lib/crti.o ${APEX}/amd64/lib/crtn.o -L ${APEX}/amd64/lib -L ${HARVEY}/amd64/lib -lap -lc
AUXEXTRALIBS=$(XTRALIBS) @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @AUX_SHARED_ZLIB@
TARGET_ARCH_FILE=./obj/harvey-arch.h
CCAUX_=$(CCAUX)
Now run this configure:
./configure CFLAGS="-I/home/john/harvey/apex/amd64/include -I/home/john/harvey/apex/include -I/home/john/harvey/sys/include -mno-red-zone -ffreestanding -fno-builtin -nostdlib -trigraphs -D_SUSV2_SOURCE -D_POSIX_SOURCE -D_LIMITS_EXTENSION -D_BSD_SOURCE -D_BSD_EXTENSION -DHAVE_SOCK_OPTS -DHARVEY" LDFLAGS="-static /home/john/harvey/apex/amd64/lib/crt1.o /home/john/harvey/apex/amd64/lib/crti.o /home/john/harvey/apex/amd64/lib/crtn.o -L/home/john/harvey/apex/amd64/lib -L/home/john/harvey/amd64/lib" LIBS="-lap -lc" LIBM="" --prefix=/home/john/harvey/ports/ --host=x86_64-harvey-gnu --build=x86_64-linux-elf --target=x86_64-harvey-elf --disable-shared --without-x
(You'll need to change the paths, I should have used $APEX but I suck)
And now run make.
@rminnich
Copy link

rminnich commented Mar 6, 2017

"grab the latest gs source" -- > can we just pull this into apex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment