Hi (salut),

NB> Ipe is already running under MacPorts (I don't have MacPorts
NB> installed). I compiled and installed ipe7 under Fink with the aid of
NB> some dependent libraries that could be installed from Fink
NB> (unstable), like cairo and freetype2. I used the Apple QtCore and
NB> QtGui (the config.mak was allowing such a setting for OS/X 10.6).

I did the same myself at some point, I am attaching what I did so far so
that you can compare ... The issue is that .so is the dynamic library
extension in linux, and not in darwin, but that is not very problematic
in itself, you just need to tell fink to shut up about it, or have the
build process rename the file to something.dylib and make ipe look for
.dylib files rather than .so ones [I do the second thing].

Attachment: ipe.info
Description: Binary data

diff --git a/OSX/Info.plist b/OSX/Info.plist
new file mode 100644
index 0000000..92f58db
--- /dev/null
+++ b/OSX/Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>ipe</string>
+	<key>CFBundleGetInfoString</key>
+	<string>ipe v. 7.0.12</string>
+	<key>CFBundleIdentifier</key>
+	<string>net.sourceforge.ipe7</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>ipe</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>ipe v. 7.0.12</string>
+	<key>CFBundleVersion</key>
+	<string>1.0.1</string>
+</dict>
+</plist>
diff --git a/OSX/ipe b/OSX/ipe
new file mode 100644
index 0000000..b7e48e3
--- /dev/null
+++ b/OSX/ipe
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+export IPE_PWD=`pwd`
+export IPE_ARGS="$*"
+
+open -a _SW_/Applications/ipe.app
diff --git a/OSX/ipe_wrapper b/OSX/ipe_wrapper
new file mode 100644
index 0000000..7bfc3f4
--- /dev/null
+++ b/OSX/ipe_wrapper
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd $IPE_PWD
+
+exec $0.bin $IPE_ARGS
diff --git a/src/common.mak b/src/common.mak
index 7fe5059..c196542 100644
--- a/src/common.mak
+++ b/src/common.mak
@@ -105,11 +105,13 @@ else
     soname      = -Wl,-soname,lib$1.so.$(IPEVERS)
   endif
   buildlib	= $(BUILDDIR)/lib
-  dll_target    = $(buildlib)/lib$1.so.$(IPEVERS)
-  dll_symlinks  = ln -sf lib$1.so.$(IPEVERS) $(buildlib)/lib$1.so
-  install_symlinks = ln -sf lib$1.so.$(IPEVERS) \
-		$(INSTALL_ROOT)$(IPELIBDIR)/lib$1.so
-  ipelet_target = $(BUILDDIR)/ipelets/$1.so
+  dll_target    = $(buildlib)/lib$1.$(IPEVERS).dylib
+  soname        = -install_name _SW_/lib/lib$1.7.dylib -compatibility_version $(IPEVERS) -current_version $(IPEVERS)
+  dll_symlinks  = ln -sf lib$1.$(IPEVERS).dylib $(buildlib)/lib$1.7.dylib && \
+                  ln -sf lib$1.7.dylib $(buildlib)/lib$1.dylib
+  install_symlinks = ln -sf lib$1.$(IPEVERS).dylib $(INSTALL_ROOT)$(IPELIBDIR)/lib$1.7.dylib && \
+                     ln -sf lib$1.7.dylib $(INSTALL_ROOT)$(IPELIBDIR)/lib$1.dylib
+  ipelet_target = $(BUILDDIR)/ipelets/$1.dylib
   exe_target	= $(BUILDDIR)/bin/$1
 endif
 
diff --git a/src/config.mak b/src/config.mak
index b6bed04..487afdc 100644
--- a/src/config.mak
+++ b/src/config.mak
@@ -52,9 +52,10 @@ else
 CONFIG     += x86_64
 LUA_CFLAGS = $(shell pkg-config --cflags lua)
 LUA_LIBS   = $(shell pkg-config --libs lua)
-QT_CFLAGS  = -I/Library/Frameworks/QtCore.framework/Versions/4/Headers \
-	     -I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-QT_LIBS    = -F/Library/Frameworks -L/Library/Frameworks \
+QT_CFLAGS  = -I_SW_/lib/qt4-mac/lib/QtCore.framework/Versions/4/Headers \
+	     -I_SW_/lib/qt4-mac/lib/QtGui.framework/Versions/4/Headers \
+	     -I_SW_/lib/qt4-mac/include
+QT_LIBS    = -F_SW_/lib/qt4-mac/lib -L_SW_/lib/qt4-mac/lib \
 	     -framework QtCore -framework ApplicationServices \
 	     -framework QtGui -framework AppKit -framework Cocoa -lz -lm
 MOC	   = moc
diff --git a/src/ipelua/ipeluaipelet.cpp b/src/ipelua/ipeluaipelet.cpp
index 8d6c806..55ddd0e 100644
--- a/src/ipelua/ipeluaipelet.cpp
+++ b/src/ipelua/ipeluaipelet.cpp
@@ -67,7 +67,7 @@ int ipelua::ipelet_constructor(lua_State *L)
 #ifdef WIN32
   fname += ".dll";
 #else
-  fname += ".so";
+  fname += ".dylib";
 #endif
   ipeDebug("Loading dll '%s'", fname.z());
   PNewIpeletFn pIpelet = 0;
One tricky thing to make ipe more mac-friendly is to wrap it inside an
App bundle, and make it still launchable by typing "ipe toto.ipe" in a
terminal. That requires packing ARGV and the current working directory
in the environment before calling 'open'.

Maybe I should have put that in the tracker ...

HTH,

      /v

-- 
|                 |   UMPA - ENS Lyon   | Mél: vbeff...@ens-lyon.fr |
| Vincent Beffara |  46 allée d'Italie  | Tél: (+33) 4 72 72 85 25  |
|                 | 69364 Lyon Cedex 07 | Fax: (+33) 4 72 72 84 80  |
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and publish 
your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to