* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2007-11-28 14:20 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2007-11-28 14:20 UTC (permalink / raw
To: gentoo-commits
lack 07/11/28 14:20:59
Modified: rox.eclass
Log:
Minor reorganization, also added support for APPMIME variable in ebuilds to set
the MimeType of the created .desktop files.
Revision Changes Path
1.23 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.22&r2=1.23
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- rox.eclass 12 Jun 2007 20:15:22 -0000 1.22
+++ rox.eclass 28 Nov 2007 14:20:58 -0000 1.23
@@ -1,13 +1,13 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.22 2007/06/12 20:15:22 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.23 2007/11/28 14:20:58 lack Exp $
-# ROX eclass Version 2
+# ROX eclass Version 3
# This eclass was created by Sergey Kuleshov (svyatogor@gentoo.org) and
# Alexander Simonov (devil@gentoo.org.ua) to ease installation of ROX desktop
# applications. Enhancements and python additions by Peter Hyman.
-# Small fixes and current maintenance by the Rox herd (rox@gentoo.org)
+# Small fixes and current maintenance by Jim Ramsay (lack@gentoo.org)
# These variables are used in the GLOBAL scope to decide on DEPENDs, so they
# must be set BEFORE you 'inherit rox':
@@ -16,7 +16,7 @@
# ROX_LIB_VER - version of rox-lib required if any
# ROX_CLIB_VER - version of rox-clib required if any
#
-# These variables are only used in local scopes, and so may be set anywhere in
+# These variables are only used inside functions, and so may be set anywhere in
# the ebuild:
#
# APPNAME - the actual name of the application as the app folder is named
@@ -31,8 +31,17 @@
# If unset, no .desktop file will be created. For a list of acceptable
# category names, see
# http://standards.freedesktop.org/menu-spec/latest/apa.html
+# APPMIME - the .desktop MimeTypes value to include. This is a
+# semicolon-delimited list of mime-types. Any characters in [[:space:]] are
+# ignored. If the supported mime-types are dependent upon USE flags, the new
+# 'usemime' function may be useful. For example:
+# APPMIME="a/foo-1;a/foo-2
+# $(usemime three "a/three")
+# text/plain"
+# will be expanded to either "a/foo-1;a/foo-2;a/three;text/plain" if USE=three
+# or "a/foo-1;a/foo-2;text/plain" if not.
# KEEP_SRC - this flag, if set, will not remove the source directory
-# but will do a make clean in it. This is useful if users wish to
+# but will do a 'make clean' in it. This is useful if users wish to
# preserve the source code for some reason
# For examples refer to ebuilds in rox-extra/ or rox-base/
@@ -63,16 +72,34 @@
# It is also used for the icon name in /usr/share/pixmaps
#
# Use rox-${PN} unless ${PN} already starts with 'rox'
-a="rox-${PN}"
-b=${a/rox-rox*}
-WRAPPERNAME=${b:-${PN}}
+_a="rox-${PN}"
+_b=${_a/rox-rox*}
+WRAPPERNAME=${_b:-${PN}}
+unset _a _b
# This is the location where all applications are installed
APPDIR="/usr/$(get_libdir)/rox"
LIBDIR="/usr/$(get_libdir)"
+# External Functions
+
+# Used for assembling APPMIME with USE-dependent parts
+usemime() {
+ local myuse=$1; shift
+ useq $myuse && echo "$@"
+}
+
# Utility Functions
+# Expands APPMIME properly, removing whitespace, newlines, and putting in ';'
+# where needed.
+expandmime() {
+ local old_IFS=$IFS
+ IFS=";$' \t\n'"
+ echo "$*"
+ IFS=$old_IFS
+}
+
# Creates a .desktop file for this rox application
# (Adapted from eutils::make_desktop_entry)
#
@@ -112,71 +139,20 @@
extra=${1}; shift
done
+ # Subshell, so as to not pollute the caller's env.
(
- # wrap the env here so that the 'insinto' call
- # doesn't corrupt the env of the caller
insinto /usr/share/applications
doins "${desktop}"
)
}
-# Exported functions
-rox_src_compile() {
- cd "${APPNAME}"
- #Some packages need to be compiled.
- chmod 755 AppRun
- if [[ -d src/ ]]; then
- # Bug 150303: Check with Rox-Clib will fail if the user has 0install
- # installed on their system somewhere, so remove the check for it in the
- # configure script, and adjust the path that the 'libdir' program uses
- # to search for it:
- if [[ -f src/configure.in ]]; then
- cd src
- sed -i.bak -e 's/ROX_CLIB_0LAUNCH/ROX_CLIB/' configure.in
- # TODO: This should really be 'eautoreconf', but that breaks a number
- # of packages (such as pager-1.0.1)
- eautoconf
- cd ..
- fi
- export LIBDIRPATH="${LIBDIR}"
-
- # Most rox self-compiles have a 'read' call to wait for the user to
- # press return if the compile fails.
- # Find and remove this:
- sed -i.bak -e 's/\<read\>/#read/' AppRun
-
- ./AppRun --compile || die "Failed to compile the package"
- if [[ -n "${KEEP_SRC}" ]]; then
- cd src
- make clean
- cd ..
- else
- rm -rf src
- fi
- if [[ -d build ]]; then
- rm -rf build
- fi
-
- # Restore the original AppRun
- mv AppRun.bak AppRun
- fi
-}
-
-rox_src_install() {
- if [[ -d "${APPNAME}/Help/" ]]; then
- for i in "${APPNAME}"/Help/*; do
- dodoc "${i}"
- done
- fi
-
- insinto ${APPDIR}
-
- # Use 'cp -pPR' and not 'doins -r' here so we don't have to do a flurry of
- # 'chmod' calls on the executables in the appdir - Just be sure that all the
- # files in the original appdir prior to this step are correct, as they will
- # all be preserved.
- cp -pPR ${APPNAME} ${D}${APPDIR}/${APPNAME}
-
+#
+# Install the wrapper in /usr/bin for commandline execution
+#
+# Environment needed:
+# WRAPPERNAME, APPDIR, LIBDIR, APPNAME, APPNAME_COLLISION
+#
+rox_install_wrapper() {
if [[ "${WRAPPERNAME}" != "skip" ]]; then
#create a script in bin to run the application from command line
dodir /usr/bin/
@@ -199,7 +175,7 @@
# Old name of cmdline wrapper: /usr/bin/${APPNAME}
if [[ ! "${APPNAME_COLLISION}" ]]; then
- ln -s ${WRAPPERNAME} ${D}/usr/bin/${APPNAME}
+ ln -s ${WRAPPERNAME} "${D}/usr/bin/${APPNAME}"
# TODO: Migrate this away... eventually
else
ewarn "The wrapper script /usr/bin/${APPNAME} has been removed"
@@ -207,7 +183,12 @@
ewarn "/usr/bin/${WRAPPERNAME} instead."
fi
fi
+}
+#
+# Copy the .DirIcon into the pixmaps dir, and create the .desktop file
+#
+rox_install_desktop() {
# Create a .desktop file if the proper category is supplied
if [[ -n "${APPCATEGORY}" ]]; then
# Copy the .DirIcon into /usr/share/pixmaps with the proper extension
@@ -234,14 +215,80 @@
export APPICON=${WRAPPERNAME}
;;
esac
+ # Subshell, so as to not pollute the caller's env.
+ (
insinto /usr/share/pixmaps
newins "${APPDIRICON}" "${APPICON}"
+ )
fi
- rox_desktop_entry "${WRAPPERNAME}" "${APPNAME}" "${APPICON}" "${APPCATEGORY}"
+ rox_desktop_entry "${WRAPPERNAME}" "${APPNAME}" "${APPICON}" \
+ "${APPCATEGORY}" "MimeType=$(expandmime $APPMIME)"
fi
+}
+
+# Exported functions
+rox_src_compile() {
+ cd "${APPNAME}"
+ #Some packages need to be compiled.
+ chmod 755 AppRun
+ if [[ -d src/ ]]; then
+ # Bug 150303: Check with Rox-Clib will fail if the user has 0install
+ # installed on their system somewhere, so remove the check for it in the
+ # configure script, and adjust the path that the 'libdir' program uses
+ # to search for it:
+ if [[ -f src/configure.in ]]; then
+ cd src
+ sed -i.bak -e 's/ROX_CLIB_0LAUNCH/ROX_CLIB/' configure.in
+ # TODO: This should really be 'eautoreconf', but that breaks
+ # some packages (such as rox-base/pager-1.0.1)
+ eautoconf
+ cd ..
+ fi
+ export LIBDIRPATH="${LIBDIR}"
+
+ # Most rox self-compiles have a 'read' call to wait for the user to
+ # press return if the compile fails.
+ # Find and remove this:
+ sed -i.bak -e 's/\<read\>/#read/' AppRun
+
+ ./AppRun --compile || die "Failed to compile the package"
+ if [[ -n "${KEEP_SRC}" ]]; then
+ emake -C src clean
+ else
+ rm -rf src
+ fi
+ if [[ -d build ]]; then
+ rm -rf build
+ fi
+
+ # Restore the original AppRun
+ mv AppRun.bak AppRun
+ fi
+}
+
+rox_src_install() {
+ if [[ -d "${APPNAME}/Help/" ]]; then
+ for i in "${APPNAME}"/Help/*; do
+ dodoc "${i}"
+ done
+ fi
+
+ insinto ${APPDIR}
+
+ # Use 'cp -pPR' and not 'doins -r' here so we don't have to do a flurry of
+ # 'chmod' calls on the executables in the appdir - Just be sure that all the
+ # files in the original appdir prior to this step are correct, as they will
+ # all be preserved.
+ cp -pPR ${APPNAME} "${D}${APPDIR}/${APPNAME}"
+
+ # Install the wrapper in /usr/bin
+ rox_install_wrapper
+
+ # Install the .desktop application file
+ rox_install_desktop
- #now compile any and all python files
+ # Finally, optimize any python files
python_mod_optimize "${D}${APPDIR}/${APPNAME}" >/dev/null 2>&1
}
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2007-11-28 17:20 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2007-11-28 17:20 UTC (permalink / raw
To: gentoo-commits
lack 07/11/28 17:20:04
Modified: rox.eclass
Log:
Replaced IFS with marginally more readable value
Replaced useq with use (thanks to drac for pointing this out)
Added warnings about not using 'usemime' in the global scope.
Revision Changes Path
1.24 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.23&r2=1.24
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- rox.eclass 28 Nov 2007 14:20:58 -0000 1.23
+++ rox.eclass 28 Nov 2007 17:20:03 -0000 1.24
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.23 2007/11/28 14:20:58 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.24 2007/11/28 17:20:03 lack Exp $
# ROX eclass Version 3
@@ -38,8 +38,11 @@
# APPMIME="a/foo-1;a/foo-2
# $(usemime three "a/three")
# text/plain"
-# will be expanded to either "a/foo-1;a/foo-2;a/three;text/plain" if USE=three
-# or "a/foo-1;a/foo-2;text/plain" if not.
+# will be expanded to either "a/foo-1;a/foo-2;a/three;text/plain" if
+# USE=three or "a/foo-1;a/foo-2;text/plain" if not.
+# WARNING: the 'usemime' function cannot be used in global scope. You should
+# set APPMIME (or at least the USE-dependant parts) in your own src_install
+# before calling rox_src_install. See rox-extra/archive for an example.
# KEEP_SRC - this flag, if set, will not remove the source directory
# but will do a 'make clean' in it. This is useful if users wish to
# preserve the source code for some reason
@@ -84,9 +87,11 @@
# External Functions
# Used for assembling APPMIME with USE-dependent parts
+# WARNING: Cannot be used in global scope.
+# Set this in src_install just before you call rox_src_install
usemime() {
local myuse=$1; shift
- useq $myuse && echo "$@"
+ use $myuse && echo "$@"
}
# Utility Functions
@@ -95,7 +100,7 @@
# where needed.
expandmime() {
local old_IFS=$IFS
- IFS=";$' \t\n'"
+ IFS=$'; \t\n'
echo "$*"
IFS=$old_IFS
}
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2007-12-04 2:37 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2007-12-04 2:37 UTC (permalink / raw
To: gentoo-commits
lack 07/12/04 02:37:30
Modified: rox.eclass
Log:
A few small readability/sanity fixes
Revision Changes Path
1.25 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.24&r2=1.25
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- rox.eclass 28 Nov 2007 17:20:03 -0000 1.24
+++ rox.eclass 4 Dec 2007 02:37:29 -0000 1.25
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.24 2007/11/28 17:20:03 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.25 2007/12/04 02:37:29 lack Exp $
# ROX eclass Version 3
@@ -53,21 +53,20 @@
# need autotools to run autoreconf, if required
inherit python autotools eutils multilib
-if [[ -z "${ROX_VER}" ]]; then
- ROX_VER="2.1.0"
-fi
+ROX_VER=${ROX_VER:-"2.1.0"}
RDEPEND=">=rox-base/rox-${ROX_VER}"
-if [[ -n "${ROX_LIB_VER}" ]]; then
+if [[ ${ROX_LIB_VER} ]]; then
RDEPEND="${RDEPEND}
>=rox-base/rox-lib-${ROX_LIB_VER}"
fi
-if [[ -n "${ROX_CLIB_VER}" ]]; then
+if [[ ${ROX_CLIB_VER} ]]; then
RDEPEND="${RDEPEND}
>=rox-base/rox-clib-${ROX_CLIB_VER}"
- DEPEND="${RDEPEND}
+ DEPEND="${DEPEND}
+ >=rox-base/rox-clib-${ROX_CLIB_VER}
>=dev-util/pkgconfig-0.20"
fi
@@ -81,8 +80,8 @@
unset _a _b
# This is the location where all applications are installed
-APPDIR="/usr/$(get_libdir)/rox"
LIBDIR="/usr/$(get_libdir)"
+APPDIR="${LIBDIR}/rox"
# External Functions
@@ -90,8 +89,8 @@
# WARNING: Cannot be used in global scope.
# Set this in src_install just before you call rox_src_install
usemime() {
- local myuse=$1; shift
- use $myuse && echo "$@"
+ local myuse="$1"; shift
+ use "${myuse}" && echo "$@"
}
# Utility Functions
@@ -279,7 +278,7 @@
done
fi
- insinto ${APPDIR}
+ insinto "${APPDIR}"
# Use 'cp -pPR' and not 'doins -r' here so we don't have to do a flurry of
# 'chmod' calls on the executables in the appdir - Just be sure that all the
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2007-12-07 15:40 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2007-12-07 15:40 UTC (permalink / raw
To: gentoo-commits
lack 07/12/07 15:40:34
Modified: rox.eclass
Log:
Fixed icon parsing to remove icon type suffix from .desktop file
Revision Changes Path
1.26 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.25&r2=1.26
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- rox.eclass 4 Dec 2007 02:37:29 -0000 1.25
+++ rox.eclass 7 Dec 2007 15:40:34 -0000 1.26
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.25 2007/12/04 02:37:29 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.26 2007/12/07 15:40:34 lack Exp $
# ROX eclass Version 3
@@ -198,25 +198,26 @@
# Copy the .DirIcon into /usr/share/pixmaps with the proper extension
if [[ -f "${APPNAME}/.DirIcon" ]]; then
local APPDIRICON=${APPNAME}/.DirIcon
+ local APPICON
case "$(file -b ${APPDIRICON})" in
"PNG image data"*)
- export APPICON=${WRAPPERNAME}.png
+ APPICON=${WRAPPERNAME}.png
;;
"XML 1.0 document text"*)
- export APPICON=${WRAPPERNAME}.svg
+ APPICON=${WRAPPERNAME}.svg
;;
"X pixmap image text"*)
- export APPICON=${WRAPPERNAME}.xpm
+ APPICON=${WRAPPERNAME}.xpm
;;
"symbolic link"*)
APPDIRICON=$(dirname ${APPDIRICON})/$(readlink ${APPDIRICON})
- export APPICON=${WRAPPERNAME}.${APPDIRICON##*.}
+ APPICON=${WRAPPERNAME}.${APPDIRICON##*.}
;;
*)
# Unknown... Remark on it, and just copy without an extension
ewarn "Could not detect the file type of the application icon,"
ewarn "copying without an extension."
- export APPICON=${WRAPPERNAME}
+ APPICON=${WRAPPERNAME}
;;
esac
# Subshell, so as to not pollute the caller's env.
@@ -226,7 +227,7 @@
)
fi
- rox_desktop_entry "${WRAPPERNAME}" "${APPNAME}" "${APPICON}" \
+ rox_desktop_entry "${WRAPPERNAME}" "${APPNAME}" "${WRAPPERNAME}" \
"${APPCATEGORY}" "MimeType=$(expandmime $APPMIME)"
fi
}
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2008-01-02 13:22 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2008-01-02 13:22 UTC (permalink / raw
To: gentoo-commits
lack 08/01/02 13:22:14
Modified: rox.eclass
Log:
Fixing compatibility of wrapper so it REALLY works with /bin/sh (Bug #203987)
Revision Changes Path
1.27 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.26&r2=1.27
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- rox.eclass 7 Dec 2007 15:40:34 -0000 1.26
+++ rox.eclass 2 Jan 2008 13:22:13 -0000 1.27
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.26 2007/12/07 15:40:34 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.27 2008/01/02 13:22:13 lack Exp $
# ROX eclass Version 3
@@ -134,7 +134,7 @@
Exec=${exec}
TryExec=${exec%% *}
Icon=${icon}
- Categories=ROX;Application;${type};
+ Categories=${type};
EOF
local extra=${1}; shift
@@ -162,13 +162,13 @@
dodir /usr/bin/
cat >"${D}/usr/bin/${WRAPPERNAME}" <<EOF
#!/bin/sh
-if [[ "\${LIBDIRPATH}" ]]; then
+if [ "\${LIBDIRPATH}" ]; then
export LIBDIRPATH="\${LIBDIRPATH}:${LIBDIR}"
else
export LIBDIRPATH="${LIBDIR}"
fi
-if [[ "\${APPDIRPATH}" ]]; then
+if [ "\${APPDIRPATH}" ]; then
export APPDIRPATH="\${APPDIRPATH}:${APPDIR}"
else
export APPDIRPATH="${APPDIR}"
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2008-06-04 12:37 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2008-06-04 12:37 UTC (permalink / raw
To: gentoo-commits
lack 08/06/04 12:37:33
Modified: rox.eclass
Log:
Moved python_mod_optimize to pkg_postinst (Bug #224833)
Revision Changes Path
1.28 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.27&r2=1.28
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- rox.eclass 2 Jan 2008 13:22:13 -0000 1.27
+++ rox.eclass 4 Jun 2008 12:37:33 -0000 1.28
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.27 2008/01/02 13:22:13 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.28 2008/06/04 12:37:33 lack Exp $
# ROX eclass Version 3
@@ -292,12 +292,11 @@
# Install the .desktop application file
rox_install_desktop
-
- # Finally, optimize any python files
- python_mod_optimize "${D}${APPDIR}/${APPNAME}" >/dev/null 2>&1
}
rox_pkg_postinst() {
+ python_mod_optimize "${APPDIR}/${APPNAME}" >/dev/null 2>&1
+
einfo "${APPNAME} has been installed into ${APPDIR}"
if [[ "${WRAPPERNAME}" != "skip" ]]; then
einfo "You can run it by typing ${WRAPPERNAME} at the command line."
@@ -309,4 +308,9 @@
einfo "on ${APPNAME}'s icon, drag it to a panel, desktop, etc."
}
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst
+rox_pkg_postrm() {
+ python_mod_cleanup
+}
+
+
+EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2008-06-04 13:12 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2008-06-04 13:12 UTC (permalink / raw
To: gentoo-commits
lack 08/06/04 13:12:24
Modified: rox.eclass
Log:
Fixed python_mod_cleanup to clean up in the right place
Revision Changes Path
1.29 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.28&r2=1.29
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- rox.eclass 4 Jun 2008 12:37:33 -0000 1.28
+++ rox.eclass 4 Jun 2008 13:12:23 -0000 1.29
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.28 2008/06/04 12:37:33 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.29 2008/06/04 13:12:23 lack Exp $
# ROX eclass Version 3
@@ -309,7 +309,7 @@
}
rox_pkg_postrm() {
- python_mod_cleanup
+ python_mod_cleanup "${APPDIR}"
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2008-10-31 13:02 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2008-10-31 13:02 UTC (permalink / raw
To: gentoo-commits
lack 08/10/31 13:02:32
Modified: rox.eclass
Log:
Updated .DirIcon file type detection to match new output I'm getting from a
recent upgrade of 'file'.
Revision Changes Path
1.30 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.29&r2=1.30
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- rox.eclass 4 Jun 2008 13:12:23 -0000 1.29
+++ rox.eclass 31 Oct 2008 13:02:31 -0000 1.30
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.29 2008/06/04 13:12:23 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.30 2008/10/31 13:02:31 lack Exp $
# ROX eclass Version 3
@@ -200,10 +200,11 @@
local APPDIRICON=${APPNAME}/.DirIcon
local APPICON
case "$(file -b ${APPDIRICON})" in
- "PNG image data"*)
+ "PNG image"*)
APPICON=${WRAPPERNAME}.png
;;
- "XML 1.0 document text"*)
+ "XML 1.0 document text"* | \
+ "SVG Scalable Vector Graphics image"*)
APPICON=${WRAPPERNAME}.svg
;;
"X pixmap image text"*)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2010-03-07 20:42 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2010-03-07 20:42 UTC (permalink / raw
To: gentoo-commits
lack 10/03/07 20:42:13
Modified: rox.eclass
Log:
Remove deprecated 'Version' and 'Encoding' from eclass-generated .desktop files
Revision Changes Path
1.31 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.30&r2=1.31
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- rox.eclass 31 Oct 2008 13:02:31 -0000 1.30
+++ rox.eclass 7 Mar 2010 20:42:13 -0000 1.31
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.30 2008/10/31 13:02:31 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.31 2010/03/07 20:42:13 lack Exp $
# ROX eclass Version 3
@@ -126,8 +126,6 @@
cat <<-EOF > "${desktop}"
[Desktop Entry]
- Encoding=UTF-8
- Version=1.0
Name=${name}
Type=Application
Comment=${DESCRIPTION}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2010-03-23 14:42 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2010-03-23 14:42 UTC (permalink / raw
To: gentoo-commits
lack 10/03/23 14:42:56
Modified: rox.eclass
Log:
With latest update to eutils.eclass and make_desktop_entry (Bug #310763), I can
stop using my ill-advised copy of this function.
Revision Changes Path
1.32 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.31&r2=1.32
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- rox.eclass 7 Mar 2010 20:42:13 -0000 1.31
+++ rox.eclass 23 Mar 2010 14:42:55 -0000 1.32
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.31 2010/03/07 20:42:13 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.32 2010/03/23 14:42:55 lack Exp $
# ROX eclass Version 3
@@ -104,50 +104,6 @@
IFS=$old_IFS
}
-# Creates a .desktop file for this rox application
-# (Adapted from eutils::make_desktop_entry)
-#
-# rox_desktop_entry <exec> <name> <icon> <type> [<extra> ...]
-# exec - The executable to run
-# name - The name to display
-# icon - The icon file to display
-# Any other arguments will be appended verbatim to the desktop file.
-#
-# The name of the desktop file will be ${exec}.desktop
-#
-rox_desktop_entry() {
- # Coppied from etuils:make_desktop_entry
- local exec=${1}; shift
- local name=${1}; shift
- local icon=${1}; shift
- local type=${1}; shift
-
- local desktop="${exec}.desktop"
-
- cat <<-EOF > "${desktop}"
- [Desktop Entry]
- Name=${name}
- Type=Application
- Comment=${DESCRIPTION}
- Exec=${exec}
- TryExec=${exec%% *}
- Icon=${icon}
- Categories=${type};
- EOF
-
- local extra=${1}; shift
- while [[ "${extra}" ]]; do
- echo "${extra}" >> "${desktop}"
- extra=${1}; shift
- done
-
- # Subshell, so as to not pollute the caller's env.
- (
- insinto /usr/share/applications
- doins "${desktop}"
- )
-}
-
#
# Install the wrapper in /usr/bin for commandline execution
#
@@ -226,7 +182,7 @@
)
fi
- rox_desktop_entry "${WRAPPERNAME}" "${APPNAME}" "${WRAPPERNAME}" \
+ make_desktop_entry "${WRAPPERNAME}" "${APPNAME}" "${WRAPPERNAME}" \
"${APPCATEGORY}" "MimeType=$(expandmime $APPMIME)"
fi
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass
@ 2010-04-01 17:03 Jim Ramsay (lack)
0 siblings, 0 replies; 11+ messages in thread
From: Jim Ramsay (lack) @ 2010-04-01 17:03 UTC (permalink / raw
To: gentoo-commits
lack 10/04/01 17:03:47
Modified: rox.eclass
Log:
Update to better deal with python3 and multiple python ABIs
Basically we just outright assert that all rox-base/* and rox-extra/*
python-based apps will only work with python2. We'll be back to address this
again if any of them ever become python3-aware.
Revision Changes Path
1.33 eclass/rox.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.32&r2=1.33
Index: rox.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- rox.eclass 23 Mar 2010 14:42:55 -0000 1.32
+++ rox.eclass 1 Apr 2010 17:03:47 -0000 1.33
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.32 2010/03/23 14:42:55 lack Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.33 2010/04/01 17:03:47 lack Exp $
# ROX eclass Version 3
@@ -49,6 +49,11 @@
# For examples refer to ebuilds in rox-extra/ or rox-base/
+if [[ ${ROX_LIB_VER} ]]; then
+ # Presently all packages which require ROX_LIB also require python2
+ PYTHON_DEPEND="2"
+fi
+
# need python to byte compile modules, if any
# need autotools to run autoreconf, if required
inherit python autotools eutils multilib
@@ -188,8 +193,19 @@
}
# Exported functions
+
+rox_pkg_setup() {
+ if [[ ${PYTHON_DEPEND} ]]; then
+ python_set_active_version 2
+ fi
+}
+
rox_src_compile() {
cd "${APPNAME}"
+ # Python packages need their shebangs fixed
+ if [[ ${PYTHON_DEPEND} ]]; then
+ python_convert_shebangs -r 2 .
+ fi
#Some packages need to be compiled.
chmod 755 AppRun
if [[ -d src/ ]]; then
@@ -250,7 +266,9 @@
}
rox_pkg_postinst() {
- python_mod_optimize "${APPDIR}/${APPNAME}" >/dev/null 2>&1
+ if [[ ${PYTHON_DEPEND} ]]; then
+ python_mod_optimize "${APPDIR}/${APPNAME}" >/dev/null 2>&1
+ fi
einfo "${APPNAME} has been installed into ${APPDIR}"
if [[ "${WRAPPERNAME}" != "skip" ]]; then
@@ -264,8 +282,10 @@
}
rox_pkg_postrm() {
- python_mod_cleanup "${APPDIR}"
+ if [[ ${PYTHON_DEPEND} ]]; then
+ python_mod_cleanup "${APPDIR}"
+ fi
}
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
+EXPORT_FUNCTIONS pkg_setup src_compile src_install pkg_postinst pkg_postrm
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-04-01 17:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 13:02 [gentoo-commits] gentoo-x86 commit in eclass: rox.eclass Jim Ramsay (lack)
-- strict thread matches above, loose matches on Subject: below --
2010-04-01 17:03 Jim Ramsay (lack)
2010-03-23 14:42 Jim Ramsay (lack)
2010-03-07 20:42 Jim Ramsay (lack)
2008-06-04 13:12 Jim Ramsay (lack)
2008-06-04 12:37 Jim Ramsay (lack)
2008-01-02 13:22 Jim Ramsay (lack)
2007-12-07 15:40 Jim Ramsay (lack)
2007-12-04 2:37 Jim Ramsay (lack)
2007-11-28 17:20 Jim Ramsay (lack)
2007-11-28 14:20 Jim Ramsay (lack)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox