build objects with -fPIC and use -shared for building shared library.

fixes build on amd64 and prevents dumping core on startup on sparc64.
bump PKGNAME.

much help and ok naddy@, no objection sturm@
This commit is contained in:
steven 2006-02-17 22:08:52 +00:00
parent 711c40c229
commit f50c822b4c
3 changed files with 35 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 2006/02/11 16:37:02 sturm Exp $
# $OpenBSD: Makefile,v 1.3 2006/02/17 22:08:52 steven Exp $
SHARED_ONLY= Yes
@ -6,7 +6,7 @@ COMMENT= "circuit drawing and schematic capture"
BASEVER= 3.4
DISTNAME= xcircuit-${BASEVER}.11
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= cad
HOMEPAGE= http://opencircuitdesign.com/xcircuit/

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-Makefile_in,v 1.1 2006/02/17 22:08:52 steven Exp $
--- Makefile.in.orig Mon Nov 21 22:35:37 2005
+++ Makefile.in Sun Feb 12 15:27:26 2006
@@ -361,7 +361,7 @@ distclean-compile:
-rm -f *.tab.c
.c.o:
- $(COMPILE) -c $<
+ $(COMPILE) $(SHLIB_CFLAGS) -c $<
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
@@ -787,7 +787,7 @@ menudep.h: menudep$(EXEEXT)
xcwrap.o: xcwrap.c menudep.h
$(CC) ${CPPFLAGS} ${CFLAGS} ${DEFS} $(PATHNAMES) $(INCLUDES) \
- xcwrap.c -c -o xcwrap.o
+ ${SHLIB_CFLAGS} xcwrap.c -c -o xcwrap.o
lib/tcl/xcircuit${SHDLIB_EXT}: xcwrap.o ${xcircuit_OBJECTS} ${xcircuit_DEPEND}
$(RM) lib/xcircuit${SHDLIB_EXT}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure_in,v 1.1 2006/02/17 22:08:52 steven Exp $
--- configure.in.orig Mon Nov 21 22:02:02 2005
+++ configure.in Fri Feb 17 01:13:20 2006
@@ -1006,7 +1006,7 @@ if test "x$xc_with_tcl" != "x" ; then
if test "$test_ok" = yes; then
SHLIB_CFLAGS="-fpic"
SHLIB_LD="ld"
- LDDL_FLAGS="-Wl,-Bshareable,-x"
+ LDDL_FLAGS="-shared"
fi
;;