Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 12:53:11 -0700 (PDT)
From:      eps+guikachu@ana.com (Eric P. Scott)
To:        gnome@FreeBSD.org
Cc:        ports@FreeBSD.org
Subject:   Need advanced help producing a 4.x palm/guikachu port (revised)
Message-ID:  <200409131953.i8DJrBkE018524@anna.ana.com>

next in thread | raw e-mail | index | archive | help
Guikachu is a graphical tool for laying out Palm OS user
interfaces.  Its only real competition is the Java-based
pilrcedit, which hasn't been updated in about four years.

Guikachu has two branches: "stable" releases are designated
1.4.x; "development" releases, 1.5.x.  There are significant
differences between them, which suggests creating separate
palm/guikachu and palm/guikachu-devel ports.  Note that the 1.4.x
series is based on GNOME 1.4, while the 1.5.x series expects
GNOME 2.6.  The remainder of this document concerns the most
recent stable version, Guikachu 1.4.2.

My intended goal is to have a port that will work on FreeBSD
4.10-RELEASE.  There are specific issues here that may not
pertain to FreeBSD 5.x, so those of you who only develop for 
-CURRENT can stop reading now.

Guikachu is a nontrivial application, with hundreds of source
files and dependencies on about five dozen shared libraries.

The first obstacle you'll run into is that Guikachu will not
build with the compiler in the base system, gcc 2.95.4.  It
requires some flavor of gcc 3.x.  The problem here is that
gcc 2 and gcc 3 produce different (i.e. incompatible) objects
from C++ sources, and they will not link together.  This means
that simply declaring USE_GCC=3.3 is not sufficient; the
configure script will fail.  If you try adding
--disable-gtkmmtest and --disable-sigctest to CONFIGURE_ARGS, the
sources will compile, but the build will die when it gets to the
link stage.

Fortunately, only four of the libraries Guikachu needs are
C++-based, so if those can be built statically, it's possible to
produce viable executables.


For the record, Guikachu's expected prerequisites "should be"

LIB_DEPENDS=	gnomemm-1.2.10:${PORTSDIR}/x11-toolkits/gnome-- \
	Magick++.6:${PORTSDIR}/graphics/ImageMagick
USE_GNOME=      libglade gnomevfs


Guikachu's use of ImageMagick (specifically, libMagick++) makes
things particularly unpleasant.

At the moment, I have a manual package-building procedure.  I'm
almost certainly taking The Wrong Approach, so I'm putting what I
have out there in the hope that someone will figure out The Right
Way and submit it for inclusion in the Ports collection.


How to reproduce what I have on a 4.10-RELEASE system:


Run /stand/sysinstall

Go to Configure > Packages

Select and install the following packages (which should bring in
their dependencies):

gnome > gnomevfs-1.0.5_5
gnome > libglade-0.17_3
graphics > ImageMagick-5.5.7.16_1
lang > gcc-3.3.4_20040411

It is not necessary to install the  gnome > gnomemm-1.2.4_2
package.

You may also find it convenient to fetch an extra copy of
ImageMagick-5.5.7.16_1.tgz at this time.

[No, I haven't looked into what happens if you try to use
ImageMagick 6.whatever.]


Delete the installed copy of ImageMagick:

pkg_delete -v ImageMagick-5.5.7.16_1

(Obviously, if you've installed anything else that depends on
ImageMagick, you'll need to remove it first.)


Make a copy of /usr/ports/graphics/ImageMagick/ somewhere with
enough space to build from source.  You'll need to modify this
copy to build only a static libMagick++ while keeping libMagick
shared.  First, add this patch:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files/patch-cxxstatic
#
echo x - files/patch-cxxstatic
sed 's/^X//' >files/patch-cxxstatic << 'END-of-files/patch-cxxstatic'
X--- Magick++/lib/Makefile.in.orig	Thu Feb  5 16:19:42 2004
X+++ Magick++/lib/Makefile.in	Mon Aug  9 15:06:23 2004
X@@ -76,7 +76,7 @@
X 	$(AM_CXXFLAGS) $(CXXFLAGS)
X CXXLD = $(CXX)
X CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
X-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
X+	$(AM_LDFLAGS) $(LDFLAGS) -static -o $@
X SOURCES = $(libMagick___la_SOURCES)
X DIST_SOURCES = $(libMagick___la_SOURCES)
X RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
X@@ -403,8 +403,8 @@
X 
X 
X # Add -no-undefined once Cygwin supports throwing C++ exceptions from DLLs.
X-libMagick___la_LDFLAGS = \
X-	-version-info $(LIBRARY_CURRENT):$(LIBRARY_REVISION):$(LIBRARY_AGE)
X+#libMagick___la_LDFLAGS = \
X+#	-version-info $(LIBRARY_CURRENT):$(LIBRARY_REVISION):$(LIBRARY_AGE)
X 
X libMagick___la_LIBADD = ../../magick/libMagick.la
X include_HEADERS = Magick++.h
END-of-files/patch-cxxstatic
exit


Next, adjust the packing list accordingly:

*** pkg-plist.orig	Fri Feb 13 15:10:11 2004
--- pkg-plist
***************
*** 433,440 ****
  lib/ImageMagick/type.mgk
  lib/libMagick++.a
  lib/libMagick++.la
! lib/libMagick++.so
! lib/libMagick++.so.6
  lib/libMagick.a
  lib/libMagick.la
  lib/libMagick.so
--- 433,440 ----
  lib/ImageMagick/type.mgk
  lib/libMagick++.a
  lib/libMagick++.la
! @comment lib/libMagick++.so
! @comment lib/libMagick++.so.6
  lib/libMagick.a
  lib/libMagick.la
  lib/libMagick.so


Build and install this version of the port temporarily:

make USE_GCC=3.3 NOPORTDOCS=yes
make install


Now, we're ready to build Guikachu.  "Be afraid.  Be very
afraid."

begin 644 guikachu-1.4.2-port.tar.gz
M'XL("-*I/T$``V=U:6MA8VAU+3$N-"XR+7!O<G0N=&%R`.U<>W?:N!+??_&G
MT-+T;K*I`?/,IIL](>!03GGD`&E[[]FS/L86Q!N_CFV:I$V_^YV1']A``&?3
M]-X6]8&EF9\TTHQ&(_EAR[J1_^GKID*A7*A5*O#+TN(ONQ8*R%*L%JLU*!>*
MA6+EI\I7EHNEF>O)#C3I6):WCF\3/=FIXM,*^?62C?J?SK1K6;F:?25#V$[_
M0J%:JE6%`M-_J2J4=_I_AI34?U>^IA--IT_;!JBV4"V7'])_I08Z!_T+M5JQ
M7"L64?_@"8#_:<58G7YP_;\@/7I#;,OQ7*)8NDX53[-,8@2&0":6<YP)[8-[
M09JR1XGB4/A1CS.9(S*D-BG"#`?:^RO+@++,OZV90WJR0<D;ZE#RNVL9=&RI
M=Z>J9<B:F5,LXP_N!0#VSAU*SX;-/<AQ%_W!J%?OBB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achu-1.4.2.tgz can be redistributed at this
point, but we really should put things back to normal on the
build system:

pkg_delete -v guikachu-1.4.2
pkg_delete -v ImageMagick-5.5.7.16_1

Now you can:

pkg_add -v /path/to/ImageMagick-5.5.7.16_1.tgz
[the real one, if you saved it earlier; otherwise, use sysinstall
as before]

pkg_add -v guikachu-1.4.2.tgz


You should now have a properly installed Guikachu!


Hints:

HTML help installs in /usr/X11R6/share/gnome/help/guikachu/C/

If you're using WindowMaker, copy guikachu.png
(/usr/X11R6/share/gnome/pixmaps/) to ~/GNUstep/Library/Icons/
so you can display an appropriate icon on its application tile.


What's next?  Again, I'm looking for someone else to take over
all responsibility for this port; I've spent as much time on it
as I care to.  Important: I don't recommend committing something
without first figuring out why it crashes (badly!) if you select
a font for a label that uses code points that aren't in the font.
[Discovered in 1.4.1; still not fixed in 1.4.2.]

Minimal case:

Launch guikachu.  Click Add, OK.  Double-click on FORM1.  Click
the large A on the Widget palette.  Then click somewhere on the
form to place the object.  Click again to bring up the label's
Properties.  Change the Font from Regular to Symbol11.  This
will generate either a Bus error or a Segmentation fault.

It's probably really simple to fix, but someone else is going to
have to pursue this.

Please continue discussion on the freebsd-gnome mailing list;
any replies sent directly to me will most likely be discarded
unread due to [necessarily] highly aggressive spam-filtering.

Thanks in advance for your time, and congratulations are in order
for anyone who achieves a successful outcome.

Cheers,

					-=EPS-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409131953.i8DJrBkE018524>