From 9e9e2859d9f8876ad5b37f94f33c768d2164d81d Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 24 Aug 2007 21:38:23 +0000 Subject: midpath: major rework of midpath * new releas 0.1 * introduce midpath.inc * split midpath-cldc and midpath-cldc-sdl from midpath * seperate out kxml2 from midpath * split midpath-test from midpath * change jar-installdir to /usr/share/java --- packages/midpath/files/.mtn2git_empty | 0 packages/midpath/files/shellscript.patch | 27 +++++++ packages/midpath/midpath-alsa_0.1.bb | 43 +++++++++++ packages/midpath/midpath-alsa_svn.bb | 42 ----------- packages/midpath/midpath-cldc-native_0.1.bb | 14 ++++ packages/midpath/midpath-cldc-sdl_0.1.bb | 43 +++++++++++ packages/midpath/midpath-cldc-x11_0.1.bb | 40 ++++++++++ packages/midpath/midpath-cldc-x11_svn.bb | 43 ----------- packages/midpath/midpath-cldc_0.1.bb | 37 +++++++++ packages/midpath/midpath-gtk_0.1.bb | 42 +++++++++++ packages/midpath/midpath-gtk_svn.bb | 43 ----------- packages/midpath/midpath-native_svn.bb | 34 --------- packages/midpath/midpath-qt3x11_0.1.bb | 48 ++++++++++++ packages/midpath/midpath-qt3x11_svn.bb | 48 ------------ packages/midpath/midpath-qte_0.1.bb | 46 +++++++++++ packages/midpath/midpath-qte_svn.bb | 46 ----------- packages/midpath/midpath-test_0.1.bb | 46 +++++++++++ packages/midpath/midpath.inc | 22 ++++++ packages/midpath/midpath_0.1.bb | 61 +++++++++++++++ packages/midpath/midpath_svn.bb | 113 ---------------------------- 20 files changed, 469 insertions(+), 369 deletions(-) create mode 100644 packages/midpath/files/.mtn2git_empty create mode 100644 packages/midpath/files/shellscript.patch create mode 100644 packages/midpath/midpath-alsa_0.1.bb delete mode 100644 packages/midpath/midpath-alsa_svn.bb create mode 100644 packages/midpath/midpath-cldc-native_0.1.bb create mode 100644 packages/midpath/midpath-cldc-sdl_0.1.bb create mode 100644 packages/midpath/midpath-cldc-x11_0.1.bb delete mode 100644 packages/midpath/midpath-cldc-x11_svn.bb create mode 100644 packages/midpath/midpath-cldc_0.1.bb create mode 100644 packages/midpath/midpath-gtk_0.1.bb delete mode 100644 packages/midpath/midpath-gtk_svn.bb delete mode 100644 packages/midpath/midpath-native_svn.bb create mode 100644 packages/midpath/midpath-qt3x11_0.1.bb delete mode 100644 packages/midpath/midpath-qt3x11_svn.bb create mode 100644 packages/midpath/midpath-qte_0.1.bb delete mode 100644 packages/midpath/midpath-qte_svn.bb create mode 100644 packages/midpath/midpath-test_0.1.bb create mode 100644 packages/midpath/midpath.inc create mode 100644 packages/midpath/midpath_0.1.bb delete mode 100644 packages/midpath/midpath_svn.bb (limited to 'packages/midpath') diff --git a/packages/midpath/files/.mtn2git_empty b/packages/midpath/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/midpath/files/shellscript.patch b/packages/midpath/files/shellscript.patch new file mode 100644 index 0000000000..17c39d0810 --- /dev/null +++ b/packages/midpath/files/shellscript.patch @@ -0,0 +1,27 @@ +Index: midpath-0.1/bin/midpath-test-cacao-cldc.sh +=================================================================== +--- midpath-0.1.orig/bin/midpath-test-cacao-cldc.sh 2007-07-03 22:09:33.000000000 +0200 ++++ midpath-0.1/bin/midpath-test-cacao-cldc.sh 2007-08-24 22:31:32.000000000 +0200 +@@ -3,19 +3,13 @@ + # Adapt the next line to your environment + JAVA_CMD=cacao + +-if [ "$MIDPATH_HOME" = "" ]; then +- MIDPATH_HOME=$(pwd)/.. +-fi ++MIDPATH_HOME= + + # Set the classpath +-BCP=$MIDPATH_HOME/dist/cldc1.1.jar:$MIDPATH_HOME/dist/midpath.jar:$MIDPATH_HOME/resources-embedded:$MIDPATH_HOME/dist/sdljava-cldc.jar:$MIDPATH_HOME/dist/escher-x11-cldc.jar:$MIDPATH_HOME/dist/kxml2-2.3.0.jar ++BCP=$MIDPATH_HOME/cldc1.1.jar:$MIDPATH_HOME/midpath.jar:$MIDPATH_HOME/resources-embedded:$MIDPATH_HOME/sdljava-cldc.jar:$MIDPATH_HOME/escher-x11-cldc.jar:$MIDPATH_HOME/kxml2-2.3.0.jar + # Add the MIDlet jar to the classpath (must be loaded by the main + # classloader yet) +-BCP=$BCP:$MIDPATH_HOME/dist/midpath-tests.jar +- +-# Path of the native libraries +-JLP=$MIDPATH_HOME/dist +-export LD_LIBRARY_PATH=$JLP ++BCP=$BCP:$MIDPATH_HOME/midpath-tests.jar + + CLASS=org.thenesis.midpath.main.StandardMIDletLauncher + # The classname of the MIDlet (we have to set it manually yet) diff --git a/packages/midpath/midpath-alsa_0.1.bb b/packages/midpath/midpath-alsa_0.1.bb new file mode 100644 index 0000000000..940a1ea8a2 --- /dev/null +++ b/packages/midpath/midpath-alsa_0.1.bb @@ -0,0 +1,43 @@ + +require midpath_${PV}.bb + +DEPENDS += "alsa-lib" +RDEPENDS = "alsa-lib" + +do_configure() { + cd ${S}/native/alsa + sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile + cd ${S}/resources-embedded/com/sun/midp/configuration + sed -i -e "s|sound.backend:NULL|sound.backend:ALSA|" configuration.cfg +} + +do_compile() { + +mkdir -p ${S}/dist + +# Build native code + +# Build the ALSA native part +cd ${S}/native/alsa +make || exit 1 + +} + +do_install() { + install -d ${D}${libdir} + install -m 0644 ${S}/native/alsa/libmidpathalsa.so ${D}${libdir} + install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration + install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/ +} + +do_stage() { + : +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${libdir}/libmidpathalsa.so \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ + " + +CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" diff --git a/packages/midpath/midpath-alsa_svn.bb b/packages/midpath/midpath-alsa_svn.bb deleted file mode 100644 index 7d230f3cd0..0000000000 --- a/packages/midpath/midpath-alsa_svn.bb +++ /dev/null @@ -1,42 +0,0 @@ - -require midpath_${PV}.bb - -DEPENDS += "alsa-lib" -RDEPENDS = "alsa-lib" - -do_configure() { - cd ${S}/native/alsa - sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile - cd ${S}/resources-embedded/com/sun/midp/configuration - sed -i -e "s|sound.backend:NULL|sound.backend:ALSA|" configuration.cfg -} - -do_compile() { - -mkdir -p ${S}/dist - -# Build native code - -# Build the ALSA native part -cd ${S}/native/alsa -make || exit 1 -cp *.so ${S}/dist - -} - -do_install() { - install -d ${D}${libdir} - install -m 0644 dist/libmidpathalsa.so ${D}${libdir} - install -d ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration - install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration/ -} - -do_stage() { - : -} - -PACKAGES = "${PN}" - -FILES_${PN} = "${libdir}/libmidpathalsa.so \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ - " diff --git a/packages/midpath/midpath-cldc-native_0.1.bb b/packages/midpath/midpath-cldc-native_0.1.bb new file mode 100644 index 0000000000..27700d2e61 --- /dev/null +++ b/packages/midpath/midpath-cldc-native_0.1.bb @@ -0,0 +1,14 @@ + +inherit native + +require midpath-cldc_${PV}.bb + + +PROVIDES = "virtual/cldc-api-1.1-native" +RPROVIDES = " " + +PACKAGES = " " + +do_install() { + : +} diff --git a/packages/midpath/midpath-cldc-sdl_0.1.bb b/packages/midpath/midpath-cldc-sdl_0.1.bb new file mode 100644 index 0000000000..d00cbfc619 --- /dev/null +++ b/packages/midpath/midpath-cldc-sdl_0.1.bb @@ -0,0 +1,43 @@ + +require midpath.inc + +do_configure() { + + cd ${S}/resources-embedded/com/sun/midp/configuration + sed -i -e "s|ui.backend:AWT|ui.backend:SDL|" \ + -e "s|bitsPerPixel:32|bitsPerPixel:16|" \ + configuration.cfg + +} + + +do_compile() { + +mkdir -p ${S}/dist + +# Build SDLJava for CLDC +cd ${S}/external/sdljava-cldc +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH} -sourcepath ${S}/external/sdljava-cldc -source 1.3 -target 1.1" || exit 1 +make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH} -source 1.3 -target 1.1" JAR_FILE="sdljava-cldc.jar" JAR_FLAGS="cvf" || exit 1 + +} + +do_install() { + install -d ${D}${datadir}/java + install -m 0644 ${S}/external/sdljava-cldc/sdljava-cldc.jar ${D}${datadir}/java + install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration + install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/ +} + +do_stage() { + install -d ${STAGING_DATADIR}/java + install -m 0644 ${S}/external/sdljava-cldc/sdljava-cldc.jar ${STAGING_DATADIR}/java +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${datadir}/java/sdljava-cldc.jar \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ + " + +CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" diff --git a/packages/midpath/midpath-cldc-x11_0.1.bb b/packages/midpath/midpath-cldc-x11_0.1.bb new file mode 100644 index 0000000000..30ca378436 --- /dev/null +++ b/packages/midpath/midpath-cldc-x11_0.1.bb @@ -0,0 +1,40 @@ + +require midpath.inc + +DEPENDS += " virtual/libx11 virtual/cldc-api-1.1" + +do_configure() { + + cd ${S}/resources-embedded/com/sun/midp/configuration + sed -i -e "s|ui.backend:AWT|ui.backend:X11|" configuration.cfg + +} + +do_compile() { + +mkdir -p ${S}/dist + +# Build Escher X11 library +cd ${S}/external/escher-cldc/core +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/escher-cldc/core -source 1.3 -target 1.1" || exit 1 +make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="escher-x11-cldc.jar" JAR_FLAGS="cvf" || exit 1 + +} + +do_install() { + install -d ${D}${datadir} + install -m 0644 ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${D}${datadir} + install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration + install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/ +} + +do_stage() { + install -d ${STAGING_DATADIR}/java + install -m 0644 ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${STAGING_DATADIR}/java +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${datadir}/java/escher-x11-cldc.jar \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ + " diff --git a/packages/midpath/midpath-cldc-x11_svn.bb b/packages/midpath/midpath-cldc-x11_svn.bb deleted file mode 100644 index 1aac20265b..0000000000 --- a/packages/midpath/midpath-cldc-x11_svn.bb +++ /dev/null @@ -1,43 +0,0 @@ - -require midpath_${PV}.bb - -DEPENDS += "virtual/libx11 virtual/cldc-api-1.1" -RDEPENDS = "libx11" - -CLDC_PATH = ${STAGING_LIBDIR}/java/cldc1.1.jar - -do_configure() { - - cd ${S}/resources-embedded/com/sun/midp/configuration - sed -i -e "s|ui.backend:AWT|ui.backend:X11|" configuration.cfg - -} - -do_compile() { - -mkdir -p ${S}/dist - -# Build Escher X11 library -cd ${S}/external/escher-cldc/core -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/escher-cldc/core -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="escher-x11-cldc.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${S}/dist - -} - -do_install() { - install -d ${D}${libdir} - install -m 0644 dist/escher-x11-cldc.jar ${D}${libdir} - install -d ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration - install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration/ -} - -do_stage() { - : -} - -PACKAGES = "${PN}" - -FILES_${PN} = "${libdir}/java/escher-x11-cldc.jar \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ - " diff --git a/packages/midpath/midpath-cldc_0.1.bb b/packages/midpath/midpath-cldc_0.1.bb new file mode 100644 index 0000000000..24ffc61332 --- /dev/null +++ b/packages/midpath/midpath-cldc_0.1.bb @@ -0,0 +1,37 @@ + +require midpath.inc + +PROVIDES = "virtual/cldc-api-1.1" + +do_compile() { + +mkdir -p ${S}/dist + +# Build CLDC1.1 +# Build base classes +cd ${S}/external/cldc1.1/src +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" || exit 1 +make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes || exit 1 +# Build CLDC extra classes for MIDP2 +cd ${S}/src/cldc-glue +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -sourcepath ${S}/src/cldc-glue -source 1.3 -target 1.1" +make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes +# Make a jar +${FASTJAR_CMD} cvf ${S}/dist/cldc1.1.jar -C ${S}/external/cldc1.1/classes . + + +} + +do_install() { + install -d ${D}${datadir}/java + install -m 0644 dist/cldc1.1.jar ${D}${datadir}/java +} + +do_stage() { + install -d ${STAGING_DATADIR}/java + install -m 0644 dist/cldc1.1.jar ${STAGING_DATADIR}/java +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${datadir}/java/cldc1.1.jar" diff --git a/packages/midpath/midpath-gtk_0.1.bb b/packages/midpath/midpath-gtk_0.1.bb new file mode 100644 index 0000000000..680b4e259d --- /dev/null +++ b/packages/midpath/midpath-gtk_0.1.bb @@ -0,0 +1,42 @@ + +require midpath.inc + +DEPENDS += "gtk+" + +do_configure() { + + cd ${S}/resources-embedded/com/sun/midp/configuration + sed -i -e "s|ui.backend:AWT|ui.backend:GTK|" configuration.cfg + + cd ${S}/native/gtk + sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile + +} + +do_compile() { + +mkdir -p ${S}/dist + +# Build the GTK native part +cd ${S}/native/gtk +make || exit 1 + +} + +do_install() { + install -d ${D}${libdir} + install -m 0644 ${S}/native/gtk/libmidpathgtk.so ${D}${libdir} + install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration + install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/ +} + +do_stage() { + : +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${libdir}/libmidpathgtk.so \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ + " +CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" diff --git a/packages/midpath/midpath-gtk_svn.bb b/packages/midpath/midpath-gtk_svn.bb deleted file mode 100644 index 3ee0d40f3d..0000000000 --- a/packages/midpath/midpath-gtk_svn.bb +++ /dev/null @@ -1,43 +0,0 @@ - -require midpath_${PV}.bb - -DEPENDS += "gtk+" -RDEPENDS = "gtk+" - -do_configure() { - - cd ${S}/resources-embedded/com/sun/midp/configuration - sed -i -e "s|ui.backend:AWT|ui.backend:GTK|" configuration.cfg - - cd ${S}/native/gtk - sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" Makefile - -} - -do_compile() { - -mkdir -p ${S}/dist - -# Build the GTK native part -cd ${S}/native/gtk -make || exit 1 -cp *.so ${S}/dist - -} - -do_install() { - install -d ${D}${libdir} - install -m 0644 dist/libmidpathgtk.so ${D}${libdir} - install -d ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration - install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration/ -} - -do_stage() { - : -} - -PACKAGES = "${PN}" - -FILES_${PN} = "${libdir}/libmidpathgtk.so \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ - " diff --git a/packages/midpath/midpath-native_svn.bb b/packages/midpath/midpath-native_svn.bb deleted file mode 100644 index dfc9ca6c4e..0000000000 --- a/packages/midpath/midpath-native_svn.bb +++ /dev/null @@ -1,34 +0,0 @@ - -inherit native - -require midpath_${PV}.bb - -DEPENDS = "ecj-native fastjar-native classpath-minimal-native" -PROVIDES = "virtual/cldc-api-1.1-native" - -PACKAGES = " " - - -do_configure() { - : -} - -do_compile() { -mkdir -p ${S}/dist - -# Build CLDC1.1 -# Build base classes -cd ${S}/external/cldc1.1/src -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" || exit 1 -make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes || exit 1 -# Build CLDC extra classes for MIDP2 -cd ${S}/src/cldc-glue -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -sourcepath ${S}/src/cldc-glue -source 1.3 -target 1.1" -make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes -# Make a jar -fastjar cvf ${S}/dist/cldc1.1.jar -C ${S}/external/cldc1.1/classes . -} - -do_install() { - : -} diff --git a/packages/midpath/midpath-qt3x11_0.1.bb b/packages/midpath/midpath-qt3x11_0.1.bb new file mode 100644 index 0000000000..1d44706db9 --- /dev/null +++ b/packages/midpath/midpath-qt3x11_0.1.bb @@ -0,0 +1,48 @@ + +require midpath.inc + +DEPENDS += " qt-mt" +RCONFILCTS = "midpath-qte" + +inherit qt3x11 + +do_configure() { + + cd ${S}/resources-embedded/com/sun/midp/configuration + sed -i -e "s|ui.backend:AWT|ui.backend:QT|" configuration.cfg + + cd ${S}/native/qt + sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" \ + -e "s|\`pkg\-config \-\-cflags qt\-mt\`|\-I${QTDIR}/include/ -DQT_THREAD_SUPPORT|" \ + -e "s|\`pkg\-config \-\-libs qt\-mt\`|\-L${QTDIR}/lib \-lqt-mt -lsupc++|" \ + Makefile +} + +do_compile() { + +mkdir -p ${S}/dist + +# Build the QT native part +cd ${S}/native/qt +make || exit 1 + +} + +do_install() { + install -d ${D}${libdir} + install -m 0644 ${S}/native/qt/libmidpathqt.so ${D}${libdir} + install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration + install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/ +} + +do_stage() { + : +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${libdir}/libmidpathqt.so \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ + " + +CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" diff --git a/packages/midpath/midpath-qt3x11_svn.bb b/packages/midpath/midpath-qt3x11_svn.bb deleted file mode 100644 index 30e855a636..0000000000 --- a/packages/midpath/midpath-qt3x11_svn.bb +++ /dev/null @@ -1,48 +0,0 @@ - -require midpath_${PV}.bb - -DEPENDS += "qt-mt" -RDEPENDS = "qt-mt" -RCONFILCTS = "midpath-qte" - -inherit qt3x11 - -do_configure() { - - cd ${S}/resources-embedded/com/sun/midp/configuration - sed -i -e "s|ui.backend:AWT|ui.backend:QT|" configuration.cfg - - cd ${S}/native/qt - sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal|" \ - -e "s|\`pkg\-config \-\-cflags qt\-mt\`|\-I${QTDIR}/include/ -DQT_THREAD_SUPPORT|" \ - -e "s|\`pkg\-config \-\-libs qt\-mt\`|\-L${QTDIR}/lib \-lqt-mt -lsupc++|" \ - Makefile -} - -do_compile() { - -mkdir -p ${S}/dist - -# Build the QT native part -cd ${S}/native/qt -make || exit 1 -cp *.so ${S}/dist - -} - -do_install() { - install -d ${D}${libdir} - install -m 0644 dist/libmidpathqt.so ${D}${libdir} - install -d ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration - install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration/ -} - -do_stage() { - : -} - -PACKAGES = "${PN}" - -FILES_${PN} = "${libdir}/libmidpathqt.so \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ - " diff --git a/packages/midpath/midpath-qte_0.1.bb b/packages/midpath/midpath-qte_0.1.bb new file mode 100644 index 0000000000..e37825bf57 --- /dev/null +++ b/packages/midpath/midpath-qte_0.1.bb @@ -0,0 +1,46 @@ + +require midpath.inc + +DEPENDS += " qte-mt" +RCONFLICTS = "midpath-qt3x11" + +do_configure() { + + cd ${S}/resources-embedded/com/sun/midp/configuration + sed -i -e "s|ui.backend:AWT|ui.backend:QT|" configuration.cfg + + cd ${S}/native/qt + sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal -DQWS|" \ + -e "s|\`pkg\-config \-\-cflags qt\-mt\`|\-I${QTDIR}/include/ -DQWS -DQT_THREAD_SUPPORT|" \ + -e "s|\`pkg\-config \-\-libs qt\-mt\`|\-L${QTDIR}/lib \-lqte-mt -lsupc++|" \ + Makefile +} + +do_compile() { + +mkdir -p ${S}/dist + +# Build the QT native part +cd ${S}/native/qt +make || exit 1 + +} + +do_install() { + install -d ${D}${libdir} + install -m 0644 ${S}/native/qt/libmidpathqt.so ${D}${libdir} + install -d ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration + install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${datadir}/java/resources-embedded/com/sun/midp/configuration/ +} + +do_stage() { + : +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${libdir}/libmidpathqt.so \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ + " + +CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" diff --git a/packages/midpath/midpath-qte_svn.bb b/packages/midpath/midpath-qte_svn.bb deleted file mode 100644 index 478883e559..0000000000 --- a/packages/midpath/midpath-qte_svn.bb +++ /dev/null @@ -1,46 +0,0 @@ - -require midpath_${PV}.bb - -DEPENDS += "qte-mt" -RDEPENDS = "qte-mt" -RCONFLICTS = "midpath-qt3x11" - -do_configure() { - - cd ${S}/resources-embedded/com/sun/midp/configuration - sed -i -e "s|ui.backend:AWT|ui.backend:QT|" configuration.cfg - - cd ${S}/native/qt - sed -i -e "s|\-I/usr/include/classpath|\-I${STAGING_INCDIR}/classpath-minimal -DQWS|" \ - -e "s|\`pkg\-config \-\-cflags qt\-mt\`|\-I${QTDIR}/include/ -DQWS -DQT_THREAD_SUPPORT|" \ - -e "s|\`pkg\-config \-\-libs qt\-mt\`|\-L${QTDIR}/lib \-lqte-mt -lsupc++|" \ - Makefile -} - -do_compile() { - -mkdir -p ${S}/dist - -# Build the QT native part -cd ${S}/native/qt -make || exit 1 -cp *.so ${S}/dist - -} - -do_install() { - install -d ${D}${libdir} - install -m 0644 dist/libmidpathqt.so ${D}${libdir} - install -d ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration - install -m 0644 resources-embedded/com/sun/midp/configuration/configuration.cfg ${D}${libdir}/java/resources-embedded/com/sun/midp/configuration/ -} - -do_stage() { - : -} - -PACKAGES = "${PN}" - -FILES_${PN} = "${libdir}/libmidpathqt.so \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \ - " diff --git a/packages/midpath/midpath-test_0.1.bb b/packages/midpath/midpath-test_0.1.bb new file mode 100644 index 0000000000..14bfdc97f0 --- /dev/null +++ b/packages/midpath/midpath-test_0.1.bb @@ -0,0 +1,46 @@ + +require midpath.inc + +SRC_URI += "file://shellscript.patch;patch=1" + +DEPENDS += " midpath" +RDEPENDS += " midpath" + +CLDC_PATH = ${STAGING_DATADIR}/java/cldc1.1.jar + +do_configure() { + + cd ${S}/bin + sed -i -e "s|MIDPATH_HOME=|MIDPATH_HOME=${datadir}/java|" \ + midpath-test-cacao-cldc.sh + +} + +do_compile() { + +cd ${S}/tests +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${STAGING_DATADIR}/java/midpath.jar:${CLDC_PATH} -sourcepath ${S}/tests -source 1.3 -target 1.1" || exit 1 +make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${STAGING_DATADIR}/java/midpath.jar:${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="midpath-tests.jar" JAR_FLAGS="cvf" || exit 1 + +} + +do_install() { + install -d ${D}${bindir} +# install -m 0755 bin/graphical_launcher-j2se.sh ${D}${bindir} +# install -m 0755 bin/midpath-test.sh ${D}${bindir} + install -m 0755 bin/midpath-test-cacao-cldc.sh ${D}${bindir} + install -d ${D}${datadir}/java + install -m 0644 ${S}/tests/midpath-tests.jar ${D}${datadir}/java +} + +do_stage() { + : +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${datadir}/java/midpath-tests.jar \ +# ${bindir}/graphical_launcher-j2se.sh \ +# ${bindir}/midpath-test.sh \ + ${bindir}/midpath-test-cacao-cldc.sh \ + " diff --git a/packages/midpath/midpath.inc b/packages/midpath/midpath.inc new file mode 100644 index 0000000000..7f6e4f3d31 --- /dev/null +++ b/packages/midpath/midpath.inc @@ -0,0 +1,22 @@ +DESCRIPTION = "MIDPath is a Java library which provides a MIDP2 implementation" +HOMEPAGE = "http://midpath.thenesis.org/" +LICENSE = "GPL" +PRIORITY = "optional" +SECTION = "interpreters" +PR = "r0" + +SRC_URI = "http://downloads.sourceforge.net/midpath/midpath-${PV}.tar.gz" + +S = "${WORKDIR}/midpath-${PV}" + +DEPENDS = "ecj-native fastjar-native classpath-minimal" + +JAVAC_CMD = "${STAGING_BINDIR_NATIVE}/ecj" + +FASTJAR_CMD = "${STAGING_BINDIR_NATIVE}/fastjar" + +JAVA_PATH = "${STAGING_DATADIR}/java" + +GNU_CLASSPATH_PATH = "${JAVA_PATH}/classpath-minimal/glibj.zip" + +CLDC_PATH = ${JAVA_PATH}/cldc1.1.jar diff --git a/packages/midpath/midpath_0.1.bb b/packages/midpath/midpath_0.1.bb new file mode 100644 index 0000000000..3501144701 --- /dev/null +++ b/packages/midpath/midpath_0.1.bb @@ -0,0 +1,61 @@ + +require midpath.inc + +DEPENDS += " kxml2 midpath-cldc midpath-cldc-x11 midpath-cldc-sdl" +RSUGGESTS += " kxml2" + +do_compile() { + +mkdir -p ${S}/dist + +# Build MP3 library +cd ${S}/external/jlayerme-cldc/src +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/jlayerme-cldc/src -source 1.3 -target 1.1" || exit 1 +make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="jlayerme-cldc.jar" JAR_FLAGS="cvf" || exit 1 +cp ${S}/external/jlayerme-cldc/src/jlayerme-cldc.jar ${S}/dist + +# Build OGG library +cd ${S}/external/jorbis-cldc/src +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -sourcepath ${S}/external/jorbis-cldc/src -source 1.3 -target 1.1" || exit 1 +make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH} -source 1.3 -target 1.1" JAR_FILE="jorbis-cldc.jar" JAR_FLAGS="cvf" || exit 1 +cp ${S}/external/jorbis-cldc/src/jorbis-cldc.jar ${S}/dist + +# Build Bluetooth library +cd ${S}/external/javabluetooth/src +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${GNU_CLASSPATH_PATH}:${CLDC_PATH}:${S}/lib/RXTXcomm.jar -sourcepath ${S}/external/javabluetooth/src -source 1.3 -target 1.1" || exit 1 +make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${GNU_CLASSPATH_PATH}:${CLDC_PATH}:${S}/lib/RXTXcomm.jar -source 1.3 -target 1.1" JAR_FILE="jsr82-bluetooth.jar" JAR_FLAGS="cvf" || exit 1 +cp ${S}/external/javabluetooth/src/jsr82-bluetooth.jar ${S}/dist + +# Build MIDPath +cd ${S}/src/core +make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH}:${JAVA_PATH}/sdljava-cldc.jar:${JAVA_PATH}/escher-x11-cldc.jar:${S}/dist/jlayerme-cldc.jar:${S}/dist/jorbis-cldc.jar:${S}/dist/jsr82-bluetooth.jar:${JAVA_PATH}/kxml2-2.3.0.jar:${S}/lib/swt.jar -sourcepath ${S}/src/core -source 1.3 -target 1.1" || exit 1 +make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${CLDC_PATH}:${GNU_CLASSPATH_PATH}:${JAVA_PATH}/sdljava-cldc.jar:${JAVA_PATH}/dist/escher-x11-cldc.jar:${S}/dist/jlayerme-cldc.jar:${S}/dist/jorbis-cldc.jar:${S}/dist/jsr82-bluetooth.jar:${JAVA_PATH}/lib/kxml2-2.3.0.jar:${S}/lib/swt.jar -source 1.3 -target 1.1" CLASS_DIR=${S}/src/core/classes || exit 1 +# Compile JVM.java separately as it can't be compiled against cldc.jar +${JAVAC_CMD} -bootclasspath ${GNU_CLASSPATH_PATH} -source 1.3 -target 1.1 -d ${S}/src/core/classes com/sun/cldchi/jvm/JVM.java +${FASTJAR_CMD} cvf ${S}/dist/midpath.jar -C ${S}/src/core/classes . + +} + +do_install() { + install -d ${D}${datadir}/java + install -m 0644 dist/midpath.jar ${D}${datadir}/java + install -d ${D}${datadir}/java/resources-embedded + cp -rf resources-embedded/ ${D}${datadir}/java/ +} + +do_stage() { + install -d ${STAGING_DATADIR}/java + install -m 0644 dist/midpath.jar ${STAGING_DATADIR}/java +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${datadir}/java/midpath.jar \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/ \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/chameleon/ \ + ${datadir}/java/resources-embedded/com/sun/midp/configuration/l10n/ \ + ${datadir}/java/resources-embedded/com/sun/midp/chameleon/skins/resources/images/ \ + + ${datadir}/java/resources-embedded/org/thenesis/midpath/font/bdf/ \ + " +CONFFILES_${PN} = "${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" diff --git a/packages/midpath/midpath_svn.bb b/packages/midpath/midpath_svn.bb deleted file mode 100644 index 1813c26a0b..0000000000 --- a/packages/midpath/midpath_svn.bb +++ /dev/null @@ -1,113 +0,0 @@ -DESCRIPTION = "MIDPath is a Java library which provides a MIDP2 implementation" -HOMEPAGE = "http://midpath.thenesis.org/" -LICENSE = "GPL" -PRIORITY = "optional" -SECTION = "interpreters" - -SRC_URI = "svn://midpath.svn.sourceforge.net/svnroot/midpath;module=trunk;proto=https" - -S = "${WORKDIR}/trunk" - -DEPENDS = "ecj-native fastjar-native classpath-minimal" -PROVIDES = "virtual/cldc-api-1.1" -RPROVIDES_midpath-cldc = "virtual/cldc-api-1.1" - -JAVAC_CMD=${STAGING_BINDIR_NATIVE}/ecj - -FASTJAR_CMD=${STAGING_BINDIR_NATIVE}/fastjar - -GNU_CLASSPATH_PATH=${STAGING_LIBDIR}/java/classpath-minimal/glibj.zip - -do_compile() { - -mkdir -p ${S}/dist - -# Build CLDC1.1 -# Build base classes -cd ${S}/external/cldc1.1/src -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" || exit 1 -make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath . -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes || exit 1 -# Build CLDC extra classes for MIDP2 -cd ${S}/src/cldc-glue -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -sourcepath ${S}/src/cldc-glue -source 1.3 -target 1.1" -make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes -# Make a jar -${FASTJAR_CMD} cvf ${S}/dist/cldc1.1.jar -C ${S}/external/cldc1.1/classes . - -CLDC_PATH=${S}/dist/cldc1.1.jar - -# Build SDLJava for CLDC -cd ${S}/external/sdljava-cldc -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH:${GNU_CLASSPATH_PATH} -sourcepath ${S}/external/sdljava-cldc -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH:${GNU_CLASSPATH_PATH} -source 1.3 -target 1.1" JAR_FILE="sdljava-cldc.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/external/sdljava-cldc/sdljava-cldc.jar ${S}/dist - -# Build Escher X11 library -cd ${S}/external/escher-cldc/core -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH -sourcepath ${S}/external/escher-cldc/core -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH -source 1.3 -target 1.1" JAR_FILE="escher-x11-cldc.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${S}/dist - -# Build MP3 library -cd ${S}/external/jlayerme-cldc/src -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH -sourcepath ${S}/external/jlayerme-cldc/src -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH -source 1.3 -target 1.1" JAR_FILE="jlayerme-cldc.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/external/jlayerme-cldc/src/jlayerme-cldc.jar ${S}/dist - -# Build OGG library -cd ${S}/external/jorbis-cldc/src -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH -sourcepath ${S}/external/jorbis-cldc/src -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH -source 1.3 -target 1.1" JAR_FILE="jorbis-cldc.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/external/jorbis-cldc/src/jorbis-cldc.jar ${S}/dist - -# Build Bluetooth library -cd ${S}/external/javabluetooth/src -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${GNU_CLASSPATH_PATH}:$CLDC_PATH:${S}/lib/RXTXcomm.jar -sourcepath ${S}/external/javabluetooth/src -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${GNU_CLASSPATH_PATH}:$CLDC_PATH:${S}/lib/RXTXcomm.jar -source 1.3 -target 1.1" JAR_FILE="jsr82-bluetooth.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/external/javabluetooth/src/jsr82-bluetooth.jar ${S}/dist - -# Build MIDPath -cd ${S}/src/core -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH:${GNU_CLASSPATH_PATH}:${S}/dist/sdljava-cldc.jar:${S}/dist/escher-x11-cldc.jar:${S}/dist/jlayerme-cldc.jar:${S}/dist/jorbis-cldc.jar:${S}/dist/jsr82-bluetooth.jar:${S}/lib/kxml2-2.3.0.jar:${S}/lib/swt.jar -sourcepath ${S}/src/core -source 1.3 -target 1.1" || exit 1 -make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath $CLDC_PATH:${GNU_CLASSPATH_PATH}:${S}/dist/sdljava-cldc.jar:${S}/dist/escher-x11-cldc.jar:${S}/dist/jlayerme-cldc.jar:${S}/dist/jorbis-cldc.jar:${S}/dist/jsr82-bluetooth.jar:${S}/lib/kxml2-2.3.0.jar:${S}/lib/swt.jar -source 1.3 -target 1.1" CLASS_DIR=${S}/src/core/classes || exit 1 -# Compile JVM.java separately as it can't be compiled against cldc.jar -${JAVAC_CMD} -bootclasspath ${GNU_CLASSPATH_PATH} -source 1.3 -target 1.1 -d ${S}/src/core/classes com/sun/cldchi/jvm/JVM.java -${FASTJAR_CMD} cvf ${S}/dist/midpath.jar -C ${S}/src/core/classes . - -cd ${S}/tests -make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/dist/midpath.jar:$CLDC_PATH -sourcepath ${S}/tests -source 1.3 -target 1.1" || exit 1 -make jar JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/dist/midpath.jar:$CLDC_PATH -source 1.3 -target 1.1" JAR_FILE="midpath-tests.jar" JAR_FLAGS="cvf" || exit 1 -cp ${S}/tests/midpath-tests.jar ${S}/dist - -# Add other required libraries to the dist directory -cp ${S}/lib/kxml2-2.3.0.jar ${S}/dist -} - -do_install() { - install -d ${D}${libdir}/java - install -m 0644 dist/*.jar ${D}${libdir}/java - install -d ${D}${libdir}/java/resources-embedded - cp -rf resources-embedded/* ${D}${libdir}/java/resources-embedded/ - rm -rf ${D}${libdir}/java/resources-embedded/.svn -} - -do_stage() { - install -d ${STAGING_LIBDIR}/java - install -m 0644 dist/cldc1.1.jar ${STAGING_LIBDIR}/java -} - -PACKAGES = "${PN} ${PN}-cldc" - -FILES_${PN} = "${libdir}/java/midpath.jar \ - ${libdir}/java/midpath-tests.jar \ - ${libdir}/java/kxml2-2.3.0.jar \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/ \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/chameleon/ \ - ${libdir}/java/resources-embedded/com/sun/midp/configuration/l10n/ \ - ${libdir}/java/resources-embedded/com/sun/midp/chameleon/skins/resources/images/ \ - - ${libdir}/java/resources-embedded/org/thenesis/midpath/font/bdf/ \ - " -FILES_${PN}-cldc = "${libdir}/java/cldc1.1.jar" - -CONFFILES_${PN} = "${libdir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg" -- cgit v1.2.3