parent
37678ba93f
commit
62452c467f
@ -1,3 +1,2 @@
|
||||
DIST sysstat-10.0.1.tar.bz2 265790 RMD160 5fd675358764e58a157eda5f4103dedfbc0b098f SHA1 6e13561a377c8ee48ef34d618592a28d5f6f238c SHA256 790763caae51c5a18b694a587e77e9fd3ac5dc2f47d5ce69b2d0eddb3087b094
|
||||
DIST sysstat-10.0.2.tar.bz2 268403 RMD160 307f9bdc9c014cd8380e1ef0c77fe0ddfb8382d6 SHA1 c356aa2a1338e7a70ddf359a00ecf7bfddd1790a SHA256 26570c18e0f2a80a30bcc94cb57cab09d99e84ea223a827f4f426a6246ad3eb5
|
||||
DIST sysstat-10.0.3.tar.bz2 271868 RMD160 ba59fa29eb17eebc6abe7ed2d8b570580668bbe1 SHA1 d85b261b01daf4d3fdcc69cc852fb8bb747b9f97 SHA256 22023d53f58d3d6f483b21b852d606d135e69984cf6631574633bd4e56c8ff7c
|
||||
|
@ -1,98 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/sysstat/sysstat-10.0.1.ebuild,v 1.8 2011/09/25 17:34:47 armin76 Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="System performance tools for Linux"
|
||||
HOMEPAGE="http://pagesperso-orange.fr/sebastien.godard/"
|
||||
SRC_URI="${HOMEPAGE}${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
|
||||
IUSE="cron debug +doc isag nls lm_sensors"
|
||||
|
||||
SYSSTAT_LINGUAS="
|
||||
af cs da de eo es eu fi fr id it ja ky lv mt nb nl nn pl pt pt_BR ro ru sk
|
||||
sv uk vi zh_CN zh_TW
|
||||
"
|
||||
|
||||
for SYSSTAT_LINGUA in ${SYSSTAT_LINGUAS}; do
|
||||
IUSE="${IUSE} linguas_${SYSSTAT_LINGUA}"
|
||||
done
|
||||
|
||||
RDEPEND="
|
||||
cron? ( sys-process/cronbase )
|
||||
isag? (
|
||||
dev-lang/tk
|
||||
dev-vcs/rcs
|
||||
sci-visualization/gnuplot
|
||||
)
|
||||
nls? ( virtual/libintl )
|
||||
lm_sensors? ( sys-apps/lm_sensors )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-nls.patch"
|
||||
local po_count li_count lingua NLSDIR="${S}/nls"
|
||||
|
||||
count() { echo ${#}; }
|
||||
po_count=$(count ${NLSDIR}/*.po)
|
||||
li_count=$(count ${SYSSTAT_LINGUAS})
|
||||
[[ ${po_count} = ${li_count} ]] \
|
||||
|| die "Number of LINGUAS does not match number of .po files"
|
||||
unset count
|
||||
|
||||
einfo "Keeping these locales: ${LINGUAS}."
|
||||
for lingua in ${SYSSTAT_LINGUAS}; do
|
||||
if ! use linguas_${lingua}; then
|
||||
rm -f "${NLSDIR}/${lingua}.po" || die
|
||||
fi
|
||||
done
|
||||
epatch "${FILESDIR}"/${PN}-10.0.0-flags.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf=""
|
||||
use doc || myconf="--disable-documentation"
|
||||
sa_lib_dir=/usr/$(get_libdir)/sa \
|
||||
econf ${myconf} \
|
||||
rcdir="Gentoo-does-not-use-rc.d" \
|
||||
$(use_enable cron install-cron) \
|
||||
$(use_enable debug debuginfo) \
|
||||
$(use_enable isag install-isag) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable lm_sensors sensors) \
|
||||
conf_dir=/etc || die "econf failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake LFLAGS="${LDFLAGS}" || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
keepdir /var/log/sa
|
||||
|
||||
use cron && dodir /etc/cron.{daily,hourly}
|
||||
|
||||
emake \
|
||||
DESTDIR="${D}" \
|
||||
DOC_DIR=/usr/share/doc/${PF} \
|
||||
install || die "make install failed"
|
||||
|
||||
dodoc contrib/sargraph/sargraph
|
||||
|
||||
newinitd "${FILESDIR}"/sysstat.init.d sysstat
|
||||
|
||||
use doc && rm -f "${D}"usr/share/doc/${PF}/COPYING
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "This version breaks the format of sar daily data files"
|
||||
ewarn "to enable the recording of average CPU clock frequency."
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
diff -ruN system-config-printer-1.3.9/Makefile.am my/Makefile.am
|
||||
--- system-config-printer-1.3.9/Makefile.am 2011-10-26 14:14:19.000000000 +0200
|
||||
+++ my/Makefile.am 2012-03-07 00:24:32.843305586 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-CFLAGS=-g -O2 -Wall
|
||||
+CFLAGS=-Wall
|
||||
|
||||
SUBDIRS=po
|
||||
|
||||
@@ -83,88 +83,21 @@
|
||||
rm -f .stamp-distutils-in-builddir
|
||||
|
||||
nobase_pkgdata_SCRIPTS= \
|
||||
- check-device-ids.py \
|
||||
- pysmb.py \
|
||||
- scp-dbus-service.py \
|
||||
- system-config-printer.py \
|
||||
- troubleshoot/__init__.py \
|
||||
- applet.py
|
||||
+ check-device-ids.py
|
||||
|
||||
nobase_pkgdata_DATA= \
|
||||
- asyncconn.py \
|
||||
- asyncipp.py \
|
||||
- asyncpk1.py \
|
||||
- authconn.py \
|
||||
config.py \
|
||||
- cupspk.py \
|
||||
debug.py \
|
||||
dnssdresolve.py \
|
||||
- errordialogs.py \
|
||||
- HIG.py \
|
||||
firewall.py \
|
||||
- gui.py \
|
||||
- gtkinklevel.py \
|
||||
- gtkspinner.py \
|
||||
installpackage.py \
|
||||
- jobviewer.py \
|
||||
monitor.py \
|
||||
- newprinter.py \
|
||||
- options.py \
|
||||
- optionwidgets.py \
|
||||
PhysicalDevice.py \
|
||||
- ppdcache.py \
|
||||
ppdippstr.py \
|
||||
- ppdsloader.py \
|
||||
- printerproperties.py \
|
||||
probe_printer.py \
|
||||
- gtk_label_autowrap.py \
|
||||
SearchCriterion.py \
|
||||
- serversettings.py \
|
||||
smburi.py \
|
||||
statereason.py \
|
||||
- timedops.py \
|
||||
- ToolbarSearchEntry.py \
|
||||
- userdefault.py \
|
||||
- ui/AboutDialog.ui \
|
||||
- ui/ConnectDialog.ui \
|
||||
- ui/ConnectingDialog.ui \
|
||||
- ui/InstallDialog.ui \
|
||||
- ui/JobsWindow.ui \
|
||||
- ui/NewPrinterName.ui \
|
||||
- ui/NewPrinterWindow.ui \
|
||||
- ui/PrinterPropertiesDialog.ui \
|
||||
- ui/PrintersWindow.ui \
|
||||
- ui/ServerSettingsDialog.ui \
|
||||
- ui/SMBBrowseDialog.ui \
|
||||
- ui/statusicon_popupmenu.ui \
|
||||
- ui/WaitWindow.ui \
|
||||
- icons/i-network-printer.png \
|
||||
- troubleshoot/base.py \
|
||||
- troubleshoot/CheckLocalServerPublishing.py \
|
||||
- troubleshoot/CheckNetworkServerSanity.py \
|
||||
- troubleshoot/CheckPPDSanity.py \
|
||||
- troubleshoot/CheckPrinterSanity.py \
|
||||
- troubleshoot/CheckSELinux.py \
|
||||
- troubleshoot/CheckUSBPermissions.py \
|
||||
- troubleshoot/ChooseNetworkPrinter.py \
|
||||
- troubleshoot/ChoosePrinter.py \
|
||||
- troubleshoot/DeviceListed.py \
|
||||
- troubleshoot/ErrorLogCheckpoint.py \
|
||||
- troubleshoot/ErrorLogFetch.py \
|
||||
- troubleshoot/ErrorLogParse.py \
|
||||
- troubleshoot/Locale.py \
|
||||
- troubleshoot/LocalOrRemote.py \
|
||||
- troubleshoot/NetworkCUPSPrinterShared.py \
|
||||
- troubleshoot/PrinterStateReasons.py \
|
||||
- troubleshoot/PrintTestPage.py \
|
||||
- troubleshoot/QueueNotEnabled.py \
|
||||
- troubleshoot/QueueRejectingJobs.py \
|
||||
- troubleshoot/RemoteAddress.py \
|
||||
- troubleshoot/SchedulerNotRunning.py \
|
||||
- troubleshoot/ServerFirewalled.py \
|
||||
- troubleshoot/Shrug.py \
|
||||
- troubleshoot/VerifyPackages.py \
|
||||
- troubleshoot/Welcome.py \
|
||||
xml/preferreddrivers.rng \
|
||||
xml/validate.py
|
||||
|
||||
@@ -172,11 +105,6 @@
|
||||
cupshelpers_DATA=\
|
||||
xml/preferreddrivers.xml
|
||||
|
||||
-bin_SCRIPTS= \
|
||||
- system-config-printer \
|
||||
- system-config-printer-applet \
|
||||
- dbus/scp-dbus-service
|
||||
-
|
||||
if UDEV_RULES
|
||||
udevrulesdir=$(sysconfdir)/udev/rules.d
|
||||
udevrules_DATA=udev/70-printers.rules
|
||||
@@ -201,56 +129,17 @@
|
||||
|
||||
endif
|
||||
|
||||
-man_MANS= \
|
||||
- man/system-config-printer.1 \
|
||||
- man/system-config-printer-applet.1
|
||||
-
|
||||
dbus_DATA = \
|
||||
dbus/com.redhat.NewPrinterNotification.conf \
|
||||
dbus/com.redhat.PrinterDriversInstaller.conf
|
||||
dbusdir = $(sysconfdir)/dbus-1/system.d/
|
||||
|
||||
-dbusinterfaces_DATA = \
|
||||
- dbus/org.fedoraproject.Config.Printing.xml
|
||||
-dbusinterfacesdir = $(datadir)/dbus-1/interfaces/
|
||||
-
|
||||
-dbusservices_DATA = \
|
||||
- dbus/org.fedoraproject.Config.Printing.service
|
||||
-dbusservicesdir = $(datadir)/dbus-1/services/
|
||||
-
|
||||
-desktop_DATA =\
|
||||
- system-config-printer.desktop \
|
||||
- print-applet.desktop
|
||||
desktopdir = $(datadir)/applications/
|
||||
autostartdir = $(sysconfdir)/xdg/autostart/
|
||||
|
||||
DESKTOP_VENDOR=@DESKTOPVENDOR@
|
||||
DESKTOP_PREFIX=@DESKTOPPREFIX@
|
||||
|
||||
-install-desktopDATA: $(desktop_DATA)
|
||||
- mkdir -p $(DESTDIR)$(desktopdir)
|
||||
- mkdir -p $(DESTDIR)$(desktopdir)
|
||||
- desktop-file-install $(DESKTOP_VENDOR) \
|
||||
- --dir $(DESTDIR)$(desktopdir) \
|
||||
- --add-category System \
|
||||
- --add-category Settings \
|
||||
- --add-category HardwareSettings \
|
||||
- --add-category Printing \
|
||||
- --add-category GTK \
|
||||
- system-config-printer.desktop
|
||||
- desktop-file-install $(DESKTOP_VENDOR) \
|
||||
- --dir $(DESTDIR)$(autostartdir) \
|
||||
- --add-category System \
|
||||
- --add-category Monitor \
|
||||
- --add-category GTK \
|
||||
- print-applet.desktop
|
||||
-
|
||||
-uninstall-desktopDATA:
|
||||
- rm -f $(DESTDIR)$(desktopdir)/$(DESKTOP_PREFIX)system-config-printer.desktop
|
||||
- rm -f $(DESTDIR)$(autostartdir)/$(DESKTOP_PREFIX)print-applet.desktop
|
||||
-
|
||||
-desktop_in_files = $(desktop_DATA:.desktop=.desktop.in)
|
||||
-
|
||||
EXTRA_DIST=\
|
||||
$(nobase_pkgdata_SCRIPTS) \
|
||||
$(nobase_pkgdata_DATA) \
|
@ -0,0 +1,182 @@
|
||||
diff -ruN system-config-printer-1.3.9/Makefile.am my2/Makefile.am
|
||||
--- system-config-printer-1.3.9/Makefile.am 2011-10-26 14:14:19.000000000 +0200
|
||||
+++ my2/Makefile.am 2012-03-07 00:39:47.445321514 +0100
|
||||
@@ -1,89 +1,8 @@
|
||||
-CFLAGS=-g -O2 -Wall
|
||||
+CFLAGS=-Wall
|
||||
|
||||
SUBDIRS=po
|
||||
|
||||
-EXPORT_MODULES= \
|
||||
- cupshelpers/__init__.py \
|
||||
- cupshelpers/cupshelpers.py \
|
||||
- cupshelpers/installdriver.py \
|
||||
- cupshelpers/ppds.py \
|
||||
- cupshelpers/openprinting.py \
|
||||
- cupshelpers/xmldriverprefs.py
|
||||
-
|
||||
-EXPORT_MODULES_GEN= \
|
||||
- cupshelpers/config.py
|
||||
-
|
||||
-### Automake hooks for Distutils.
|
||||
-# The distutils module doesn't understand srcdir != builddir,
|
||||
-# so we copy in, along with the cupshelpers modules, into
|
||||
-# the builddir for 'all', 'install-exec', and 'clean' hooks.
|
||||
-.stamp-distutils-in-builddir: setup.py $(EXPORT_MODULES)
|
||||
- if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
|
||||
- cp $(top_srcdir)/setup.py .; \
|
||||
- $(mkdir_p) cupshelpers; \
|
||||
- for file in $(EXPORT_MODULES); do \
|
||||
- cp $(top_srcdir)/$$file $$file; \
|
||||
- done; \
|
||||
- fi
|
||||
- touch .stamp-distutils-in-builddir
|
||||
-
|
||||
-dist-hook: mk-ChangeLog
|
||||
-.PHONE: mk-ChangeLog
|
||||
-mk-ChangeLog:
|
||||
- if test -d .git; then \
|
||||
- $(top_srcdir)/gitlog-to-changelog \
|
||||
- --since=2009-05-01 -- --no-merges \
|
||||
- > $(distdir)/cl ; \
|
||||
- mv -f $(distdir)/cl $(distdir)/ChangeLog ; \
|
||||
- fi
|
||||
-
|
||||
-config.py: config.py.in Makefile
|
||||
- sed \
|
||||
- -e "s|\@prefix\@|$(prefix)|" \
|
||||
- -e "s|\@datadir\@|$(datadir)|" \
|
||||
- -e "s|\@localedir\@|$(localedir)|" \
|
||||
- -e "s|\@VERSION\@|$(VERSION)|" \
|
||||
- -e "s|\@PACKAGE\@|$(PACKAGE)|" \
|
||||
- $< > $@
|
||||
-
|
||||
-cupshelpers/config.py: cupshelpers/config.py.in Makefile
|
||||
- $(mkdir_p) cupshelpers
|
||||
- sed \
|
||||
- -e "s|\@prefix\@|$(prefix)|" \
|
||||
- -e "s|\@sysconfdir\@|$(sysconfdir)|" \
|
||||
- $< > $@
|
||||
-
|
||||
-# Use distutils to build the module.
|
||||
-all-local: .stamp-distutils-in-builddir config.py cupshelpers/config.py
|
||||
- $(PYTHON) setup.py build
|
||||
-
|
||||
-# Use distutils to install the module.
|
||||
-install-exec-local: .stamp-distutils-in-builddir
|
||||
- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
|
||||
-
|
||||
-# Uninstall the module, crossing our fingers that we know enough
|
||||
-# about how distutils works to do this. Unfortunately, distutils
|
||||
-# doesn't provide a way to do this itself.
|
||||
-uninstall-local:
|
||||
- rm -f $(DESTDIR)/$(pythondir)/cupshelpers*.egg-info
|
||||
- for file in $(EXPORT_MODULES) $(EXPORT_MODULES_GEN); do \
|
||||
- rm -f $(DESTDIR)/$(pythondir)/$$file*; \
|
||||
- done
|
||||
-
|
||||
-# Tell distutils to clean up.
|
||||
-clean-local:
|
||||
- -$(PYTHON) setup.py clean --all
|
||||
- if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
|
||||
- rm -f setup.py; \
|
||||
- for file in $(EXPORT_MODULES) \
|
||||
- $(EXPORT_MODULES_GEN); do \
|
||||
- rm -f $$file*; \
|
||||
- done; \
|
||||
- fi
|
||||
- rm -f .stamp-distutils-in-builddir
|
||||
-
|
||||
nobase_pkgdata_SCRIPTS= \
|
||||
- check-device-ids.py \
|
||||
pysmb.py \
|
||||
scp-dbus-service.py \
|
||||
system-config-printer.py \
|
||||
@@ -95,33 +14,21 @@
|
||||
asyncipp.py \
|
||||
asyncpk1.py \
|
||||
authconn.py \
|
||||
- config.py \
|
||||
cupspk.py \
|
||||
- debug.py \
|
||||
- dnssdresolve.py \
|
||||
errordialogs.py \
|
||||
HIG.py \
|
||||
- firewall.py \
|
||||
gui.py \
|
||||
gtkinklevel.py \
|
||||
gtkspinner.py \
|
||||
- installpackage.py \
|
||||
jobviewer.py \
|
||||
- monitor.py \
|
||||
newprinter.py \
|
||||
options.py \
|
||||
optionwidgets.py \
|
||||
- PhysicalDevice.py \
|
||||
ppdcache.py \
|
||||
- ppdippstr.py \
|
||||
ppdsloader.py \
|
||||
printerproperties.py \
|
||||
- probe_printer.py \
|
||||
gtk_label_autowrap.py \
|
||||
- SearchCriterion.py \
|
||||
serversettings.py \
|
||||
- smburi.py \
|
||||
- statereason.py \
|
||||
timedops.py \
|
||||
ToolbarSearchEntry.py \
|
||||
userdefault.py \
|
||||
@@ -164,52 +71,17 @@
|
||||
troubleshoot/ServerFirewalled.py \
|
||||
troubleshoot/Shrug.py \
|
||||
troubleshoot/VerifyPackages.py \
|
||||
- troubleshoot/Welcome.py \
|
||||
- xml/preferreddrivers.rng \
|
||||
- xml/validate.py
|
||||
-
|
||||
-cupshelpersdir=$(sysconfdir)/cupshelpers
|
||||
-cupshelpers_DATA=\
|
||||
- xml/preferreddrivers.xml
|
||||
+ troubleshoot/Welcome.py
|
||||
|
||||
bin_SCRIPTS= \
|
||||
system-config-printer \
|
||||
system-config-printer-applet \
|
||||
dbus/scp-dbus-service
|
||||
|
||||
-if UDEV_RULES
|
||||
-udevrulesdir=$(sysconfdir)/udev/rules.d
|
||||
-udevrules_DATA=udev/70-printers.rules
|
||||
-udev_udev_configure_printer_SOURCES=\
|
||||
- udev/udev-configure-printer.c
|
||||
-udev_udev_configure_printer_LDADD=-lcups -ludev -lusb $(GLIB_LIBS)
|
||||
-udev_udev_configure_printer_CFLAGS=$(AM_CFLAGS) $(GLIB_CFLAGS)
|
||||
-udevhelperdir=$(sysconfdir)/udev
|
||||
-udevhelper_PROGRAMS=\
|
||||
- udev/udev-configure-printer
|
||||
-udevhelper_SCRIPTS=\
|
||||
- udev/udev-add-printer
|
||||
-
|
||||
-if HAVE_SYSTEMD
|
||||
-%.service: %.service.in
|
||||
- $(AM_V_GEN)sed -e 's,@udevhelperdir\@,$(udevhelperdir),g' $< > $@
|
||||
-systemdsystemunit_DATA = \
|
||||
- udev/udev-configure-printer.service
|
||||
-CLEANFILES = \
|
||||
- $(systemdsystemunit_DATA)
|
||||
-endif
|
||||
-
|
||||
-endif
|
||||
-
|
||||
man_MANS= \
|
||||
man/system-config-printer.1 \
|
||||
man/system-config-printer-applet.1
|
||||
|
||||
-dbus_DATA = \
|
||||
- dbus/com.redhat.NewPrinterNotification.conf \
|
||||
- dbus/com.redhat.PrinterDriversInstaller.conf
|
||||
-dbusdir = $(sysconfdir)/dbus-1/system.d/
|
||||
-
|
||||
dbusinterfaces_DATA = \
|
||||
dbus/org.fedoraproject.Config.Printing.xml
|
||||
dbusinterfacesdir = $(datadir)/dbus-1/interfaces/
|
@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emacs/vm/vm-8.1.2.ebuild,v 1.1 2012/03/06 21:37:34 ulm Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit elisp eutils
|
||||
|
||||
MY_PV="${PV/_/-}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
DESCRIPTION="The VM mail reader for Emacs"
|
||||
HOMEPAGE="http://www.nongnu.org/viewmail/"
|
||||
SRC_URI="http://launchpad.net/vm/${PV%.*}.x/${MY_PV}/+download/${MY_P}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
|
||||
IUSE="bbdb ssl"
|
||||
|
||||
DEPEND="bbdb? ( app-emacs/bbdb )"
|
||||
RDEPEND="!app-emacs/u-vm-color
|
||||
${DEPEND}
|
||||
ssl? ( net-misc/stunnel )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
SITEFILE="50${PN}-gentoo-8.0.el"
|
||||
|
||||
src_prepare() {
|
||||
if ! use bbdb; then
|
||||
elog "Excluding vm-pcrisis.el since the \"bbdb\" USE flag is not set."
|
||||
epatch "${FILESDIR}/${PN}-8.0-no-pcrisis.patch"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--with-emacs="emacs" \
|
||||
--with-pixmapdir="${SITEETC}/${PN}" \
|
||||
$(use bbdb && echo "--with-other-dirs=${SITELISP}/bbdb")
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake -j1 DESTDIR="${D}" install
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
|
||||
dodoc CHANGES NEWS README TODO example.vm
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/srm/srm-1.2.10.ebuild,v 1.2 2010/02/08 19:42:41 ulm Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
DESCRIPTION="A command-line compatible rm which destroys file contents before unlinking."
|
||||
HOMEPAGE="http://sourceforge.net/projects/srm/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="!app-misc/secure-delete
|
||||
!dev-lang/sr"
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed."
|
||||
dodoc AUTHORS ChangeLog NEWS README TODO
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Please notice that srm will not work as expected with any"
|
||||
ewarn "journaled file system (e.g. reiserfs, ext3)."
|
||||
ewarn "Please read /usr/share/doc/${PF}/README"
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/srm/srm-1.2.11-r1.ebuild,v 1.4 2012/02/04 13:43:51 ranger Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="A command-line compatible rm which destroys file contents before unlinking."
|
||||
HOMEPAGE="http://sourceforge.net/projects/srm/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE="debug"
|
||||
|
||||
DEPEND="!app-misc/secure-delete
|
||||
sys-kernel/linux-headers
|
||||
"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog NEWS README TODO )
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/cflags.patch"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable debug)
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Please notice that srm will not work as expected with any"
|
||||
ewarn "journaled file system (e.g. reiserfs, ext3)."
|
||||
ewarn "See: /usr/share/doc/${PF}/README"
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/srm/srm-1.2.11.ebuild,v 1.1 2011/09/28 23:23:23 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="A command-line compatible rm which destroys file contents before unlinking."
|
||||
HOMEPAGE="http://sourceforge.net/projects/srm/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="!app-misc/secure-delete"
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
dodoc README
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Please notice that srm will not work as expected with any"
|
||||
ewarn "journaled file system (e.g. reiserfs, ext3)."
|
||||
ewarn "Take a look at the compressed README inside /usr/share/doc/${PF}"
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/srm/srm-1.2.8-r1.ebuild,v 1.5 2011/03/01 10:15:02 xmw Exp $
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="A command-line compatible rm which destroys file contents before unlinking."
|
||||
HOMEPAGE="http://sourceforge.net/projects/srm/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~ppc x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="!app-misc/secure-delete"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/${P}-remove-mount.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed."
|
||||
dodoc README Changes
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Please notice that srm will not work as expected with any"
|
||||
ewarn "journaled file system (e.g. reiserfs, ext3)."
|
||||
ewarn "Take a look at the compressed README inside /usr/share/doc/${PF}"
|
||||
}
|
@ -1,7 +1,3 @@
|
||||
DIST postgis-1.3.1.tar.gz 2148125 RMD160 f199505dc04bd2caa0400c9235bbf1aecfe14b6f SHA1 db8e954dfc19e73c2331358a396e2064d1333a72 SHA256 5ce999ae638c1c9f75a7cf85d416eac71cc2d6f668132c2b6a3ae6a12075555c
|
||||
DIST postgis-1.3.6.tar.gz 2227317 RMD160 1f1797c8063b40653707be404bdebdc2573bbfea SHA1 1d4c34a31994b75ef79cf139543fc80fe0bd4438 SHA256 d3b04d4a3439596a1f6368b0627f21762347cef1e0694d5471ef17c6a3b7d144
|
||||
DIST postgis-1.4.0.tar.gz 3143966 RMD160 e5f6cb7ddc78f7c20954b0aa3a3906e31581a1d7 SHA1 454d87021c46c9fa4f657819e31a74b8fc75193a SHA256 71c5ffde54a2ecbb88fbffa12ca18c617ecfe2404fb9049940cd1b7a06a7e38d
|
||||
DIST postgis-1.4.2.tar.gz 3276515 RMD160 007af40a83701ba828b2bb6d7e7899d386d3ef23 SHA1 9a3386380b68ef1b15af86789d68b7f420d9ffd4 SHA256 5ce49b83b4c8f62eccb7080157f05299ff0e49c6ba06c3e1fa1ecfa2682c4d4b
|
||||
DIST postgis-1.5.0.tar.gz 3752211 RMD160 815c445d7ab628254130d2277648913e945b2af9 SHA1 8addacea2439a52f07735b58268dcef8df46912c SHA256 f79e8f740d48367e5481183c33e09b860c2c4466b196ea99c5601db287e2d324
|
||||
DIST postgis-1.5.2.tar.gz 3749293 RMD160 5ba251f6b4138d5a1a85ef26a2d08b6d4f280e0e SHA1 b1368c08f2a0d22bf7adc57ab419f1e30cacbf56 SHA256 0ae2778816b6a86026f38ba1e2a9418247a81c364ad468d6a5be0c77b1065f08
|
||||
DIST postgis-1.5.3.tar.gz 3779956 RMD160 e30275890b175cbe1d70d5899cbe45ec34ddbafb SHA1 e8c572e0258ba760a67b7f717bdc8321b9f6cd58 SHA256 a2334f8b229446c0497d48a430a40152a3b71a5da02f414a0340a0a025d416cf
|
||||
|
@ -1,181 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.3.1.ebuild,v 1.8 2010/06/17 19:09:52 patrick Exp $
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://www.postgis.org/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="geos proj doc"
|
||||
|
||||
RDEPEND="dev-db/postgresql-server
|
||||
geos? ( sci-libs/geos )
|
||||
proj? ( sci-libs/proj )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xsl-stylesheets )"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup(){
|
||||
local tmp
|
||||
tmp="$(portageq match / ${CATEGORY}/${PN} | cut -d'.' -f2)"
|
||||
if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
|
||||
elog "You must soft upgrade your existing postgis enabled databases"
|
||||
elog "using 'emerge --config postgis'."
|
||||
require_soft_upgrade="1"
|
||||
ebeep 2
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile(){
|
||||
local myconf
|
||||
if use geos; then
|
||||
myconf="--with-geos"
|
||||
fi
|
||||
|
||||
if use doc;then
|
||||
myconf="${myconf} --with-xsl=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
|
||||
grep xsl\- | cut -d':' -f1)"
|
||||
fi
|
||||
|
||||
econf --enable-autoconf \
|
||||
--datadir=/usr/share/postgresql/contrib/ \
|
||||
--libdir=/usr/$(get_libdir)/postgresql/ \
|
||||
--with-docdir=/usr/share/doc/${PF}/html/ \
|
||||
${myconf} \
|
||||
$(use_with proj) ||\
|
||||
die "Error: econf failed"
|
||||
|
||||
emake || die "Error: emake failed"
|
||||
|
||||
cd topology/
|
||||
emake || die "Unable to build topology sql file"
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"
|
||||
emake docs || die "Unable to build documentation"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install(){
|
||||
dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
cd "${S}/topology/"
|
||||
emake DESTDIR="${D}" install || die "emake install topology failed"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
cd "${S}"
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" docs-install || die "emake install docs failed"
|
||||
fi
|
||||
|
||||
if [ ! -z "${require_soft_upgrade}" ]; then
|
||||
grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql |\
|
||||
grep -v "'sql'" > \
|
||||
"${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To create new spatial database use 'emerge --config ${PN}.'"
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
myuser="${PG_USER:-postgres}"
|
||||
mydb="${PGDATABASE:-template_gis}"
|
||||
|
||||
is_template=false
|
||||
if [ "${mydb:0:8}" == "template" ];then
|
||||
is_template=true
|
||||
mytype="template database"
|
||||
else
|
||||
mytype="database"
|
||||
fi
|
||||
|
||||
einfo "Create or upgrade a spatial template and database."
|
||||
einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
|
||||
einfo "Please do 'export PG_USER=...' to use another user."
|
||||
einfo "Please do 'export PGDATABASE=...' to set another template/database"
|
||||
einfo "name (templates name have to be prefixed with 'template')."
|
||||
|
||||
logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
|
||||
safe_exit(){
|
||||
eerror "Removing created ${mydb} ${mytype}"
|
||||
dropdb -q -U "${myuser}" "${mydb}" ||\
|
||||
(eerror "${1}"
|
||||
die "Removing old db failed, you must do it manually")
|
||||
eerror "Please read ${logfile} for more information."
|
||||
die "${1}"
|
||||
}
|
||||
|
||||
# if there is not a table or a template existing with the same name, create.
|
||||
if [ -z "$(psql -U "${myuser}" -l | grep "${mydb}")" ]; then
|
||||
einfo
|
||||
einfo "Please hit ENTER if you want to create the ${mydb}"
|
||||
einfo "${mytype} as "${myuser}" user, or Control-C to abort now..."
|
||||
read
|
||||
createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
|
||||
die "Unable to create the ${mydb} ${mytype} as ${myuser}"
|
||||
createlang -U ${myuser} plpgsql ${mydb}
|
||||
if [ "$?" == 2 ]; then
|
||||
safe_exit "Unable to createlang plpgsql ${mydb}."
|
||||
fi
|
||||
(psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to load sql files."
|
||||
fi
|
||||
if ${is_template}; then
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"UPDATE pg_database SET datistemplate = TRUE
|
||||
WHERE datname = '${mydb}';
|
||||
GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;
|
||||
VACUUM FREEZE;" || die "Unable to create ${mydb}"
|
||||
fi
|
||||
else
|
||||
einfo
|
||||
einfo "Please hit ENTER if you want to upgrade the ${mydb}"
|
||||
einfo "${mytype} as ${myuser} user, or Control-C to abort now..."
|
||||
read
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
|
||||
then
|
||||
einfo "Updating the dynamic library references"
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
|
||||
2> "${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to update references."
|
||||
fi
|
||||
fi
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
|
||||
then
|
||||
einfo "Running soft upgrade"
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to run soft upgrade."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if ${is_template}; then
|
||||
einfo "You can now create a spatial database using :"
|
||||
einfo "'createdb -T ${mydb} test'"
|
||||
fi
|
||||
}
|
@ -1,188 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.4.0.ebuild,v 1.5 2010/06/17 19:09:52 patrick Exp $
|
||||
|
||||
EAPI="1"
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND=">=dev-db/postgresql-server-8.2
|
||||
>=sci-libs/geos-3
|
||||
>=sci-libs/proj-4.5.0"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xsl-stylesheets
|
||||
media-gfx/imagemagick )"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup(){
|
||||
if [ ! -z "${PGUSER}" ]; then
|
||||
eval unset PGUSER
|
||||
fi
|
||||
if [ ! -z "${PGDATABASE}" ]; then
|
||||
eval unset PGDATABASE
|
||||
fi
|
||||
local tmp
|
||||
tmp="$(portageq match / ${CATEGORY}/${PN} | cut -d'.' -f2)"
|
||||
if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
|
||||
elog "You must soft upgrade your existing postgis enabled databases"
|
||||
elog "by adding their names in the ${ROOT}conf.d/postgis_dbs file"
|
||||
elog "then using 'emerge --config postgis'."
|
||||
require_soft_upgrade="1"
|
||||
ebeep 2
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile(){
|
||||
local myconf
|
||||
if use doc; then
|
||||
myconf="${myconf} --with-xsldir=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
|
||||
grep xsl\- | cut -d':' -f1)"
|
||||
fi
|
||||
|
||||
econf --enable-autoconf \
|
||||
--datadir=/usr/share/postgresql/contrib/ \
|
||||
--libdir=/usr/$(get_libdir)/postgresql/ \
|
||||
--docdir=${D}/usr/share/doc/${PF}/html/ \
|
||||
${myconf} ||\
|
||||
die "Error: econf failed"
|
||||
|
||||
emake -j1 || die "Error: emake failed"
|
||||
|
||||
cd topology/
|
||||
emake -j1 || die "Unable to build topology sql file"
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"
|
||||
emake -j1 docs || die "Unable to build documentation"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install(){
|
||||
dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
cd "${S}/topology/"
|
||||
emake DESTDIR="${D}" install || die "emake install topology failed"
|
||||
|
||||
cd "${S}"
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
cd "${S}"
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" docs-install || die "emake install docs failed"
|
||||
fi
|
||||
|
||||
echo "template_gis" > postgis_dbs
|
||||
doconfd postgis_dbs
|
||||
|
||||
if [ ! -z "${require_soft_upgrade}" ]; then
|
||||
grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql | \
|
||||
grep -v "'sql'" > \
|
||||
"${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To create new (upgrade) spatial databases add their names in the"
|
||||
elog "${ROOT}conf.d/postgis_dbs file, then use 'emerge --config postgis'."
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
einfo "Create or upgrade a spatial templates and databases."
|
||||
einfo "Please add your databases names into ${ROOT}conf.d/postgis_dbs"
|
||||
einfo "(templates name have to be prefixed with 'template')."
|
||||
for i in $(cat "${ROOT}etc/conf.d/postgis_dbs"); do
|
||||
source "${ROOT}"etc/conf.d/postgresql
|
||||
PGDATABASE=${i}
|
||||
eval set PGDATABASE=${i}
|
||||
myuser="${PGUSER:-postgres}"
|
||||
mydb="${PGDATABASE:-template_gis}"
|
||||
eval set PGUSER=${myuser}
|
||||
|
||||
is_template=false
|
||||
if [ "${mydb:0:8}" == "template" ];then
|
||||
is_template=true
|
||||
mytype="template database"
|
||||
else
|
||||
mytype="database"
|
||||
fi
|
||||
|
||||
einfo
|
||||
einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
|
||||
|
||||
logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
|
||||
safe_exit(){
|
||||
eerror "Removing created ${mydb} ${mytype}"
|
||||
dropdb -q -U "${myuser}" "${mydb}" ||\
|
||||
(eerror "${1}"
|
||||
die "Removing old db failed, you must do it manually")
|
||||
eerror "Please read ${logfile} for more information."
|
||||
die "${1}"
|
||||
}
|
||||
|
||||
# if there is not a table or a template existing with the same name, create.
|
||||
if [ -z "$(psql -U ${myuser} -l | grep "${mydb}")" ]; then
|
||||
createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
|
||||
die "Unable to create the ${mydb} ${mytype} as ${myuser}"
|
||||
createlang -U ${myuser} plpgsql ${mydb}
|
||||
if [ "$?" == 2 ]; then
|
||||
safe_exit "Unable to createlang plpgsql ${mydb}."
|
||||
fi
|
||||
(psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to load sql files."
|
||||
fi
|
||||
if ${is_template}; then
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"UPDATE pg_database SET datistemplate = TRUE
|
||||
WHERE datname = '${mydb}';
|
||||
GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;" \
|
||||
|| die "Unable to create ${mydb}"
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"VACUUM FREEZE;" || die "Unable to set VACUUM FREEZE option"
|
||||
fi
|
||||
else
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
|
||||
then
|
||||
einfo "Updating the dynamic library references"
|
||||
psql -q -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
|
||||
2> "${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to update references."
|
||||
fi
|
||||
fi
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
|
||||
then
|
||||
einfo "Running soft upgrade"
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to run soft upgrade."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if ${is_template}; then
|
||||
einfo "You can now create a spatial database using :"
|
||||
einfo "'createdb -T ${mydb} test'"
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,199 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.5.0-r1.ebuild,v 1.4 2011/03/07 13:22:00 jlec Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND=">=dev-db/postgresql-server-8.3
|
||||
>=sci-libs/geos-3.2
|
||||
>=sci-libs/proj-4.6.0
|
||||
dev-libs/libxml2:2"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd:4.3
|
||||
media-gfx/imagemagick )"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup(){
|
||||
if [ ! -z "${PGUSER}" ]; then
|
||||
eval unset PGUSER
|
||||
fi
|
||||
if [ ! -z "${PGDATABASE}" ]; then
|
||||
eval unset PGDATABASE
|
||||
fi
|
||||
local tmp
|
||||
tmp="$(portageq match / ${CATEGORY}/${PN} | cut -d'.' -f2)"
|
||||
if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
|
||||
elog "You must soft upgrade your existing postgis enabled databases"
|
||||
elog "by adding their names in the ${ROOT}conf.d/postgis_dbs file"
|
||||
elog "then using 'emerge --config postgis'."
|
||||
require_soft_upgrade="1"
|
||||
ebeep 2
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
local myconf
|
||||
if use doc; then
|
||||
myconf="${myconf} --with-xsldir=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
|
||||
grep xsl\- | cut -d':' -f1)"
|
||||
fi
|
||||
|
||||
econf --enable-autoconf \
|
||||
--datadir=/usr/share/postgresql/contrib/ \
|
||||
--libdir=/usr/$(get_libdir)/postgresql/ \
|
||||
--docdir="${D}/usr/share/doc/${PF}/html/" \
|
||||
${myconf} ||\
|
||||
die "Error: econf failed"
|
||||
|
||||
if use doc; then
|
||||
cd doc
|
||||
sed -i -e 's:PGSQL_DOCDIR=/:PGSQL_DOCDIR=${D}/:' Makefile || die "Fixing doc install paths failed"
|
||||
sed -i -e 's:PGSQL_MANDIR=/:PGSQL_MANDIR=${D}/:' Makefile || die "Fixing doc install paths failed"
|
||||
sed -i -e 's:PGSQL_SHAREDIR=/:PGSQL_SHAREDIR=${D}/:' Makefile || die "Fixing doc install paths failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 || die "Error: emake failed"
|
||||
|
||||
cd topology/
|
||||
emake -j1 || die "Unable to build topology sql file"
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"
|
||||
emake -j1 docs || die "Unable to build documentation"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install(){
|
||||
dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
cd "${S}/topology/"
|
||||
emake DESTDIR="${D}" install || die "emake install topology failed"
|
||||
|
||||
cd "${S}"
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
cd "${S}"
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" docs-install || die "emake install docs failed"
|
||||
fi
|
||||
|
||||
echo "template_gis" > postgis_dbs
|
||||
doconfd postgis_dbs
|
||||
|
||||
if [ ! -z "${require_soft_upgrade}" ]; then
|
||||
grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql | \
|
||||
grep -v "'sql'" > \
|
||||
"${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To create new (upgrade) spatial databases add their names in the"
|
||||
elog "${ROOT}conf.d/postgis_dbs file, then use 'emerge --config postgis'."
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
einfo "Create or upgrade a spatial templates and databases."
|
||||
einfo "Please add your databases names into ${ROOT}conf.d/postgis_dbs"
|
||||
einfo "(templates name have to be prefixed with 'template')."
|
||||
for i in $(cat "${ROOT}etc/conf.d/postgis_dbs"); do
|
||||
source "${ROOT}"etc/conf.d/postgresql
|
||||
PGDATABASE=${i}
|
||||
eval set PGDATABASE=${i}
|
||||
myuser="${PGUSER:-postgres}"
|
||||
mydb="${PGDATABASE:-template_gis}"
|
||||
eval set PGUSER=${myuser}
|
||||
|
||||
is_template=false
|
||||
if [ "${mydb:0:8}" == "template" ];then
|
||||
is_template=true
|
||||
mytype="template database"
|
||||
else
|
||||
mytype="database"
|
||||
fi
|
||||
|
||||
einfo
|
||||
einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
|
||||
|
||||
logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
|
||||
safe_exit(){
|
||||
eerror "Removing created ${mydb} ${mytype}"
|
||||
dropdb -q -U "${myuser}" "${mydb}" ||\
|
||||
(eerror "${1}"
|
||||
die "Removing old db failed, you must do it manually")
|
||||
eerror "Please read ${logfile} for more information."
|
||||
die "${1}"
|
||||
}
|
||||
|
||||
# if there is not a table or a template existing with the same name, create.
|
||||
if [ -z "$(psql -U ${myuser} -l | grep "${mydb}")" ]; then
|
||||
createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
|
||||
die "Unable to create the ${mydb} ${mytype} as ${myuser}"
|
||||
createlang -U ${myuser} plpgsql ${mydb}
|
||||
if [ "$?" == 2 ]; then
|
||||
safe_exit "Unable to createlang plpgsql ${mydb}."
|
||||
fi
|
||||
(psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to load sql files."
|
||||
fi
|
||||
if ${is_template}; then
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"UPDATE pg_database SET datistemplate = TRUE
|
||||
WHERE datname = '${mydb}';
|
||||
GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;" \
|
||||
|| die "Unable to create ${mydb}"
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"VACUUM FREEZE;" || die "Unable to set VACUUM FREEZE option"
|
||||
fi
|
||||
else
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
|
||||
then
|
||||
einfo "Updating the dynamic library references"
|
||||
psql -q -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
|
||||
2> "${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to update references."
|
||||
fi
|
||||
fi
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
|
||||
then
|
||||
einfo "Running soft upgrade"
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to run soft upgrade."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if ${is_template}; then
|
||||
einfo "You can now create a spatial database using :"
|
||||
einfo "'createdb -T ${mydb} test'"
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,189 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.5.0.ebuild,v 1.4 2011/03/07 13:22:00 jlec Exp $
|
||||
|
||||
EAPI="1"
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND=">=dev-db/postgresql-server-8.3
|
||||
>=sci-libs/geos-3.2
|
||||
>=sci-libs/proj-4.6.0
|
||||
dev-libs/libxml2:2"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xsl-stylesheets
|
||||
media-gfx/imagemagick )"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup(){
|
||||
if [ ! -z "${PGUSER}" ]; then
|
||||
eval unset PGUSER
|
||||
fi
|
||||
if [ ! -z "${PGDATABASE}" ]; then
|
||||
eval unset PGDATABASE
|
||||
fi
|
||||
local tmp
|
||||
tmp="$(portageq match / ${CATEGORY}/${PN} | cut -d'.' -f2)"
|
||||
if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
|
||||
elog "You must soft upgrade your existing postgis enabled databases"
|
||||
elog "by adding their names in the ${ROOT}conf.d/postgis_dbs file"
|
||||
elog "then using 'emerge --config postgis'."
|
||||
require_soft_upgrade="1"
|
||||
ebeep 2
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile(){
|
||||
local myconf
|
||||
if use doc; then
|
||||
myconf="${myconf} --with-xsldir=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
|
||||
grep xsl\- | cut -d':' -f1)"
|
||||
fi
|
||||
|
||||
econf --enable-autoconf \
|
||||
--datadir=/usr/share/postgresql/contrib/ \
|
||||
--libdir=/usr/$(get_libdir)/postgresql/ \
|
||||
--docdir=${D}/usr/share/doc/${PF}/html/ \
|
||||
${myconf} ||\
|
||||
die "Error: econf failed"
|
||||
|
||||
emake -j1 || die "Error: emake failed"
|
||||
|
||||
cd topology/
|
||||
emake -j1 || die "Unable to build topology sql file"
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"
|
||||
emake -j1 docs || die "Unable to build documentation"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install(){
|
||||
dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
cd "${S}/topology/"
|
||||
emake DESTDIR="${D}" install || die "emake install topology failed"
|
||||
|
||||
cd "${S}"
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
cd "${S}"
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" docs-install || die "emake install docs failed"
|
||||
fi
|
||||
|
||||
echo "template_gis" > postgis_dbs
|
||||
doconfd postgis_dbs
|
||||
|
||||
if [ ! -z "${require_soft_upgrade}" ]; then
|
||||
grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql | \
|
||||
grep -v "'sql'" > \
|
||||
"${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To create new (upgrade) spatial databases add their names in the"
|
||||
elog "${ROOT}conf.d/postgis_dbs file, then use 'emerge --config postgis'."
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
einfo "Create or upgrade a spatial templates and databases."
|
||||
einfo "Please add your databases names into ${ROOT}conf.d/postgis_dbs"
|
||||
einfo "(templates name have to be prefixed with 'template')."
|
||||
for i in $(cat "${ROOT}etc/conf.d/postgis_dbs"); do
|
||||
source "${ROOT}"etc/conf.d/postgresql
|
||||
PGDATABASE=${i}
|
||||
eval set PGDATABASE=${i}
|
||||
myuser="${PGUSER:-postgres}"
|
||||
mydb="${PGDATABASE:-template_gis}"
|
||||
eval set PGUSER=${myuser}
|
||||
|
||||
is_template=false
|
||||
if [ "${mydb:0:8}" == "template" ];then
|
||||
is_template=true
|
||||
mytype="template database"
|
||||
else
|
||||
mytype="database"
|
||||
fi
|
||||
|
||||
einfo
|
||||
einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
|
||||
|
||||
logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
|
||||
safe_exit(){
|
||||
eerror "Removing created ${mydb} ${mytype}"
|
||||
dropdb -q -U "${myuser}" "${mydb}" ||\
|
||||
(eerror "${1}"
|
||||
die "Removing old db failed, you must do it manually")
|
||||
eerror "Please read ${logfile} for more information."
|
||||
die "${1}"
|
||||
}
|
||||
|
||||
# if there is not a table or a template existing with the same name, create.
|
||||
if [ -z "$(psql -U ${myuser} -l | grep "${mydb}")" ]; then
|
||||
createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
|
||||
die "Unable to create the ${mydb} ${mytype} as ${myuser}"
|
||||
createlang -U ${myuser} plpgsql ${mydb}
|
||||
if [ "$?" == 2 ]; then
|
||||
safe_exit "Unable to createlang plpgsql ${mydb}."
|
||||
fi
|
||||
(psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to load sql files."
|
||||
fi
|
||||
if ${is_template}; then
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"UPDATE pg_database SET datistemplate = TRUE
|
||||
WHERE datname = '${mydb}';
|
||||
GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;" \
|
||||
|| die "Unable to create ${mydb}"
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"VACUUM FREEZE;" || die "Unable to set VACUUM FREEZE option"
|
||||
fi
|
||||
else
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
|
||||
then
|
||||
einfo "Updating the dynamic library references"
|
||||
psql -q -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
|
||||
2> "${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to update references."
|
||||
fi
|
||||
fi
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
|
||||
then
|
||||
einfo "Running soft upgrade"
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to run soft upgrade."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if ${is_template}; then
|
||||
einfo "You can now create a spatial database using :"
|
||||
einfo "'createdb -T ${mydb} test'"
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,255 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.5.2-r3.ebuild,v 1.3 2011/06/17 10:14:09 scarabeus Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="doc gtk"
|
||||
|
||||
RDEPEND="
|
||||
|| (
|
||||
dev-db/postgresql-server:9.0
|
||||
dev-db/postgresql-server:8.4
|
||||
dev-db/postgresql-server:8.3
|
||||
dev-db/postgresql-server:9.1
|
||||
)
|
||||
dev-libs/libxml2:2
|
||||
>=sci-libs/geos-3.2
|
||||
>=sci-libs/proj-4.6.0
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd:4.3
|
||||
dev-libs/libxslt
|
||||
|| (
|
||||
media-gfx/imagemagick
|
||||
media-gfx/graphicsmagick[imagemagick]
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
PGIS="$(get_version_component_range 1-2)"
|
||||
|
||||
# not parallel safe
|
||||
MAKEOPTS+=" -j1"
|
||||
|
||||
pkg_setup() {
|
||||
export PGSLOT="$(postgresql-config show)"
|
||||
if [[ ${PGSLOT//.} < 83 ]] ; then
|
||||
eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher."
|
||||
eerror "Set an appropriate slot with postgresql-config."
|
||||
die "postgresql-config not set to 8.3 or higher."
|
||||
fi
|
||||
|
||||
if [[ ${PGSLOT//.} > 90 ]] ; then
|
||||
ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0."
|
||||
ewarn "This is neither supported here nor upstream."
|
||||
ewarn "However, all indicators show that this should work."
|
||||
ewarn "Any bugs you encounter should be reported upstream."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myargs=""
|
||||
use gtk && myargs+=" --with-gui"
|
||||
econf \
|
||||
${myargs}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Occasionally, builds fail because of out of order compilation.
|
||||
# Otherwise, it'd be fine.
|
||||
emake
|
||||
emake -C topology
|
||||
use doc && emake -C doc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake -C topology DESTDIR="${D}" install
|
||||
|
||||
cd "${S}"
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
if use doc; then
|
||||
cd doc/html
|
||||
dohtml -r *
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}/postgis_dbs"
|
||||
|
||||
cd "${S}/doc"
|
||||
doman man/*
|
||||
insinto /usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}/
|
||||
doins postgis_comments.sql
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "To finish installing or updating PostGIS edit:"
|
||||
elog " ${EROOT%/}/etc/postgis_dbs"
|
||||
elog
|
||||
elog "Then, run:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}"
|
||||
source "${EROOT%/}/etc/postgis_dbs"
|
||||
local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}"
|
||||
|
||||
if [[ -n ${configured} ]] ; then
|
||||
einfon "Password for PostgreSQL user '${pguser}': "
|
||||
read -s PGPASSWORD
|
||||
export PGPASSWORD
|
||||
echo
|
||||
|
||||
# The server we work with must be the same slot we built against.
|
||||
local server_version
|
||||
server_version=$(psql -U ${pguser} -d postgres -p ${PGPORT} \
|
||||
-Aqwtc 'SELECT version()' 2> /dev/null)
|
||||
if [[ $? = 0 ]] ; then
|
||||
server_version=$(echo ${server_version} | cut -d " " -f 2 | \
|
||||
cut -d "." -f -2 | tr -d .)
|
||||
if [[ $server_version != ${PGSLOT//.} ]] ; then
|
||||
unset PGPASSWORD
|
||||
eerror "Server version must be ${PGSLOT}.x"
|
||||
die "Server version isn't ${PGSLOT}.x"
|
||||
fi
|
||||
else
|
||||
unset PGPASSWORD
|
||||
eerror "Is the server running?"
|
||||
die "Couldn't connect to server."
|
||||
fi
|
||||
|
||||
local retval
|
||||
safe_exit() {
|
||||
unset PGPASSWORD
|
||||
sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs"
|
||||
eend $retval
|
||||
eerror "All actions could not be performed."
|
||||
eerror "Read above to see what failed."
|
||||
eerror "Once you fix the issue, you'll need to edit:"
|
||||
eerror " ${EROOT%/}/etc/postgis_dbs"
|
||||
eerror "As some things may have succeeded."
|
||||
eerror
|
||||
die "All actions could not be performed"
|
||||
}
|
||||
|
||||
local db
|
||||
for db in ${databases[@]} ; do
|
||||
ebegin "Performing CREATE LANGUAGE on ${db}"
|
||||
createlang -U ${pguser} -p ${PGPORT} plpgsql ${db}
|
||||
retval=$?
|
||||
# In this case, only error code 1 is fatal
|
||||
[[ $retval == 1 ]] && safe_exit || eend 0
|
||||
|
||||
ebegin "Enabling PostGIS on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${templates[@]} ; do
|
||||
ebegin "Creating template database '${db}'"
|
||||
createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \
|
||||
${db} "PostGIS Template"
|
||||
retval=$?
|
||||
[[ $retval != 0 ]] && safe_exit
|
||||
|
||||
psql -q -U ${pguser} -p ${PGPORT} -c \
|
||||
"UPDATE pg_database \
|
||||
SET datistemplate = TRUE, datallowconn = TRUE \
|
||||
WHERE datname = '${db}'"
|
||||
retval=$?
|
||||
[[ $retval != 0 ]] && safe_exit
|
||||
|
||||
createlang -U ${pguser} -p ${PGPORT} plpgsql ${db}
|
||||
retval=$?
|
||||
# In this case, only error code 1 is fatal
|
||||
[[ $retval == 1 ]] && safe_exit
|
||||
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${espg_databases[@]} ; do
|
||||
ebegin "Adding ESPG to ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/spatial_ref_sys.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${comment_databases[@]} ; do
|
||||
ebegin "Adding comments on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_comments.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_3[@]} ; do
|
||||
ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_4[@]} ; do
|
||||
ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_5[@]} ; do
|
||||
ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
# Clean up and make it so the user has to edit postgis_dbs again that
|
||||
# way this script won't step on any toes due to user error.
|
||||
unset PGPASSWORD
|
||||
sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs"
|
||||
einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled."
|
||||
einfo
|
||||
einfo "To enable other databases, change the default slot:"
|
||||
einfo " postgresql-config set <slot>"
|
||||
einfo "Then, emerge this package again:"
|
||||
einfo " emerge -av =${CATEGORY}/${PF}"
|
||||
else
|
||||
eerror "You must edit:"
|
||||
eerror " ${EROOT%/}/etc/postgis_dbs"
|
||||
eerror "Before running 'emerge --config =${CATEGORY}/${PF}'"
|
||||
eerror
|
||||
die "Edit postgis_dbs"
|
||||
fi
|
||||
}
|
@ -1,199 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.5.2.ebuild,v 1.2 2011/03/07 13:22:00 jlec Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND=">=dev-db/postgresql-server-8.3
|
||||
>=sci-libs/geos-3.2
|
||||
>=sci-libs/proj-4.6.0
|
||||
dev-libs/libxml2:2"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd:4.3
|
||||
media-gfx/imagemagick )"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_setup(){
|
||||
if [ ! -z "${PGUSER}" ]; then
|
||||
eval unset PGUSER
|
||||
fi
|
||||
if [ ! -z "${PGDATABASE}" ]; then
|
||||
eval unset PGDATABASE
|
||||
fi
|
||||
local tmp
|
||||
tmp="$(portageq match / ${CATEGORY}/${PN} | cut -d'.' -f2)"
|
||||
if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
|
||||
elog "You must soft upgrade your existing postgis enabled databases"
|
||||
elog "by adding their names in the ${ROOT}conf.d/postgis_dbs file"
|
||||
elog "then using 'emerge --config postgis'."
|
||||
require_soft_upgrade="1"
|
||||
ebeep 2
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
local myconf
|
||||
if use doc; then
|
||||
myconf="${myconf} --with-xsldir=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
|
||||
grep xsl\- | cut -d':' -f1)"
|
||||
fi
|
||||
|
||||
econf --enable-autoconf \
|
||||
--datadir=/usr/share/postgresql/contrib/ \
|
||||
--libdir=/usr/$(get_libdir)/postgresql/ \
|
||||
--docdir="${D}/usr/share/doc/${PF}/html/" \
|
||||
${myconf} ||\
|
||||
die "Error: econf failed"
|
||||
|
||||
if use doc; then
|
||||
cd doc
|
||||
sed -i -e 's:PGSQL_DOCDIR=/:PGSQL_DOCDIR=${D}/:' Makefile || die "Fixing doc install paths failed"
|
||||
sed -i -e 's:PGSQL_MANDIR=/:PGSQL_MANDIR=${D}/:' Makefile || die "Fixing doc install paths failed"
|
||||
sed -i -e 's:PGSQL_SHAREDIR=/:PGSQL_SHAREDIR=${D}/:' Makefile || die "Fixing doc install paths failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 || die "Error: emake failed"
|
||||
|
||||
cd topology/
|
||||
emake -j1 || die "Unable to build topology sql file"
|
||||
|
||||
if use doc ; then
|
||||
cd "${S}"
|
||||
emake -j1 docs || die "Unable to build documentation"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install(){
|
||||
dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
cd "${S}/topology/"
|
||||
emake DESTDIR="${D}" install || die "emake install topology failed"
|
||||
|
||||
cd "${S}"
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
cd "${S}"
|
||||
if use doc; then
|
||||
emake DESTDIR="${D}" docs-install || die "emake install docs failed"
|
||||
fi
|
||||
|
||||
echo "template_gis" > postgis_dbs
|
||||
doconfd postgis_dbs
|
||||
|
||||
if [ ! -z "${require_soft_upgrade}" ]; then
|
||||
grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql | \
|
||||
grep -v "'sql'" > \
|
||||
"${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To create new (upgrade) spatial databases add their names in the"
|
||||
elog "${ROOT}conf.d/postgis_dbs file, then use 'emerge --config postgis'."
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
einfo "Create or upgrade a spatial templates and databases."
|
||||
einfo "Please add your databases names into ${ROOT}conf.d/postgis_dbs"
|
||||
einfo "(templates name have to be prefixed with 'template')."
|
||||
for i in $(cat "${ROOT}etc/conf.d/postgis_dbs"); do
|
||||
source "${ROOT}"etc/conf.d/postgresql
|
||||
PGDATABASE=${i}
|
||||
eval set PGDATABASE=${i}
|
||||
myuser="${PGUSER:-postgres}"
|
||||
mydb="${PGDATABASE:-template_gis}"
|
||||
eval set PGUSER=${myuser}
|
||||
|
||||
is_template=false
|
||||
if [ "${mydb:0:8}" == "template" ];then
|
||||
is_template=true
|
||||
mytype="template database"
|
||||
else
|
||||
mytype="database"
|
||||
fi
|
||||
|
||||
einfo
|
||||
einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
|
||||
|
||||
logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
|
||||
safe_exit(){
|
||||
eerror "Removing created ${mydb} ${mytype}"
|
||||
dropdb -q -U "${myuser}" "${mydb}" ||\
|
||||
(eerror "${1}"
|
||||
die "Removing old db failed, you must do it manually")
|
||||
eerror "Please read ${logfile} for more information."
|
||||
die "${1}"
|
||||
}
|
||||
|
||||
# if there is not a table or a template existing with the same name, create.
|
||||
if [ -z "$(psql -U ${myuser} -l | grep "${mydb}")" ]; then
|
||||
createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
|
||||
die "Unable to create the ${mydb} ${mytype} as ${myuser}"
|
||||
createlang -U ${myuser} plpgsql ${mydb}
|
||||
if [ "$?" == 2 ]; then
|
||||
safe_exit "Unable to createlang plpgsql ${mydb}."
|
||||
fi
|
||||
(psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to load sql files."
|
||||
fi
|
||||
if ${is_template}; then
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"UPDATE pg_database SET datistemplate = TRUE
|
||||
WHERE datname = '${mydb}';
|
||||
GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;" \
|
||||
|| die "Unable to create ${mydb}"
|
||||
psql -q -U ${myuser} ${mydb} -c \
|
||||
"VACUUM FREEZE;" || die "Unable to set VACUUM FREEZE option"
|
||||
fi
|
||||
else
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
|
||||
then
|
||||
einfo "Updating the dynamic library references"
|
||||
psql -q -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
|
||||
2> "${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to update references."
|
||||
fi
|
||||
fi
|
||||
if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
|
||||
then
|
||||
einfo "Running soft upgrade"
|
||||
psql -q -U ${myuser} ${mydb} -f \
|
||||
"${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
|
||||
"${logfile}"
|
||||
if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
|
||||
safe_exit "Unable to run soft upgrade."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if ${is_template}; then
|
||||
einfo "You can now create a spatial database using :"
|
||||
einfo "'createdb -T ${mydb} test'"
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,255 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.5.3.ebuild,v 1.3 2011/08/07 03:08:39 phajdan.jr Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils versionator
|
||||
|
||||
DESCRIPTION="Geographic Objects for PostgreSQL"
|
||||
HOMEPAGE="http://postgis.refractions.net"
|
||||
SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~ppc x86"
|
||||
IUSE="doc gtk"
|
||||
|
||||
RDEPEND="
|
||||
|| (
|
||||
dev-db/postgresql-server:9.0
|
||||
dev-db/postgresql-server:8.4
|
||||
dev-db/postgresql-server:8.3
|
||||
dev-db/postgresql-server:9.1
|
||||
)
|
||||
dev-libs/libxml2:2
|
||||
>=sci-libs/geos-3.2
|
||||
>=sci-libs/proj-4.6.0
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
app-text/docbook-xsl-stylesheets
|
||||
app-text/docbook-xml-dtd:4.3
|
||||
dev-libs/libxslt
|
||||
|| (
|
||||
media-gfx/imagemagick
|
||||
media-gfx/graphicsmagick[imagemagick]
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
PGIS="$(get_version_component_range 1-2)"
|
||||
|
||||
# not parallel safe
|
||||
MAKEOPTS+=" -j1"
|
||||
|
||||
pkg_setup() {
|
||||
export PGSLOT="$(postgresql-config show)"
|
||||
if [[ ${PGSLOT//.} < 83 ]] ; then
|
||||
eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher."
|
||||
eerror "Set an appropriate slot with postgresql-config."
|
||||
die "postgresql-config not set to 8.3 or higher."
|
||||
fi
|
||||
|
||||
if [[ ${PGSLOT//.} > 90 ]] ; then
|
||||
ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0."
|
||||
ewarn "This is neither supported here nor upstream."
|
||||
ewarn "However, all indicators show that this should work."
|
||||
ewarn "Any bugs you encounter should be reported upstream."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myargs=""
|
||||
use gtk && myargs+=" --with-gui"
|
||||
econf \
|
||||
${myargs}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Occasionally, builds fail because of out of order compilation.
|
||||
# Otherwise, it'd be fine.
|
||||
emake
|
||||
emake -C topology
|
||||
use doc && emake -C doc
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
emake -C topology DESTDIR="${D}" install
|
||||
|
||||
cd "${S}"
|
||||
dodoc CREDITS TODO loader/README.* doc/*txt
|
||||
|
||||
docinto topology
|
||||
dodoc topology/{TODO,README}
|
||||
dobin ./utils/postgis_restore.pl
|
||||
|
||||
if use doc; then
|
||||
cd doc/html
|
||||
dohtml -r *
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}/postgis_dbs"
|
||||
|
||||
cd "${S}/doc"
|
||||
doman man/*
|
||||
insinto /usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}/
|
||||
doins postgis_comments.sql
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "To finish installing or updating PostGIS edit:"
|
||||
elog " ${EROOT%/}/etc/postgis_dbs"
|
||||
elog
|
||||
elog "Then, run:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_config(){
|
||||
source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}"
|
||||
source "${EROOT%/}/etc/postgis_dbs"
|
||||
local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}"
|
||||
|
||||
if [[ -n ${configured} ]] ; then
|
||||
einfon "Password for PostgreSQL user '${pguser}': "
|
||||
read -s PGPASSWORD
|
||||
export PGPASSWORD
|
||||
echo
|
||||
|
||||
# The server we work with must be the same slot we built against.
|
||||
local server_version
|
||||
server_version=$(psql -U ${pguser} -d postgres -p ${PGPORT} \
|
||||
-Aqwtc 'SELECT version()' 2> /dev/null)
|
||||
if [[ $? = 0 ]] ; then
|
||||
server_version=$(echo ${server_version} | cut -d " " -f 2 | \
|
||||
cut -d "." -f -2 | tr -d .)
|
||||
if [[ $server_version != ${PGSLOT//.} ]] ; then
|
||||
unset PGPASSWORD
|
||||
eerror "Server version must be ${PGSLOT}.x"
|
||||
die "Server version isn't ${PGSLOT}.x"
|
||||
fi
|
||||
else
|
||||
unset PGPASSWORD
|
||||
eerror "Is the server running?"
|
||||
die "Couldn't connect to server."
|
||||
fi
|
||||
|
||||
local retval
|
||||
safe_exit() {
|
||||
unset PGPASSWORD
|
||||
sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs"
|
||||
eend $retval
|
||||
eerror "All actions could not be performed."
|
||||
eerror "Read above to see what failed."
|
||||
eerror "Once you fix the issue, you'll need to edit:"
|
||||
eerror " ${EROOT%/}/etc/postgis_dbs"
|
||||
eerror "As some things may have succeeded."
|
||||
eerror
|
||||
die "All actions could not be performed"
|
||||
}
|
||||
|
||||
local db
|
||||
for db in ${databases[@]} ; do
|
||||
ebegin "Performing CREATE LANGUAGE on ${db}"
|
||||
createlang -U ${pguser} -p ${PGPORT} plpgsql ${db}
|
||||
retval=$?
|
||||
# In this case, only error code 1 is fatal
|
||||
[[ $retval == 1 ]] && safe_exit || eend 0
|
||||
|
||||
ebegin "Enabling PostGIS on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${templates[@]} ; do
|
||||
ebegin "Creating template database '${db}'"
|
||||
createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \
|
||||
${db} "PostGIS Template"
|
||||
retval=$?
|
||||
[[ $retval != 0 ]] && safe_exit
|
||||
|
||||
psql -q -U ${pguser} -p ${PGPORT} -c \
|
||||
"UPDATE pg_database \
|
||||
SET datistemplate = TRUE, datallowconn = TRUE \
|
||||
WHERE datname = '${db}'"
|
||||
retval=$?
|
||||
[[ $retval != 0 ]] && safe_exit
|
||||
|
||||
createlang -U ${pguser} -p ${PGPORT} plpgsql ${db}
|
||||
retval=$?
|
||||
# In this case, only error code 1 is fatal
|
||||
[[ $retval == 1 ]] && safe_exit
|
||||
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${espg_databases[@]} ; do
|
||||
ebegin "Adding ESPG to ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/spatial_ref_sys.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${comment_databases[@]} ; do
|
||||
ebegin "Adding comments on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_comments.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_3[@]} ; do
|
||||
ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_4[@]} ; do
|
||||
ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
for db in ${upgrade_from_1_5[@]} ; do
|
||||
ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}"
|
||||
psql -q -U ${pguser} -p ${PGPORT} -d ${db} \
|
||||
-f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql"
|
||||
retval=$?
|
||||
[[ $retval == 0 ]] && eend 0 || safe_exit
|
||||
done
|
||||
|
||||
# Clean up and make it so the user has to edit postgis_dbs again that
|
||||
# way this script won't step on any toes due to user error.
|
||||
unset PGPASSWORD
|
||||
sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs"
|
||||
einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled."
|
||||
einfo
|
||||
einfo "To enable other databases, change the default slot:"
|
||||
einfo " postgresql-config set <slot>"
|
||||
einfo "Then, emerge this package again:"
|
||||
einfo " emerge -av =${CATEGORY}/${PF}"
|
||||
else
|
||||
eerror "You must edit:"
|
||||
eerror " ${EROOT%/}/etc/postgis_dbs"
|
||||
eerror "Before running 'emerge --config =${CATEGORY}/${PF}'"
|
||||
eerror
|
||||
die "Edit postgis_dbs"
|
||||
fi
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
DIST nasm-2.09.10.tar.bz2 803380 RMD160 04aa353571216eaf4724ff59e772c4f8d722f4be SHA1 ca57a7454b29e18c64018e49cdf5c832937497ab SHA256 e3afb011f762144b4d13acb1f2d9363e4a73264dc6f2d3f4dab358c8203dd59e
|
||||
DIST nasm-2.10rc8.tar.bz2 801580 RMD160 7e96abbf89f901511264c4ced6cedfd672fe7264 SHA1 eec0ae17fb731d7fe1c79215101adfbe38858f1b SHA256 ec8f3e8e83c87290c5b41aec7fa79843f5a6eb3e85708bab716d14e2adb7d187
|
||||
DIST nasm-2.10rc14.tar.bz2 813974 RMD160 4c11b2a9ea224a43090b839fbdee656753fc5ff4 SHA1 869efeda245f8c3a694a62f08a08c90e2cbf10c4 SHA256 413bdcd863e89fcf8d095b9bd26ebfa3ca91a7d2d9a1e0848b85308ab1814e58
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/nasm/nasm-2.10_rc8.ebuild,v 1.1 2011/11/07 07:39:23 mr_bones_ Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/nasm/nasm-2.10_rc14.ebuild,v 1.1 2012/03/06 20:40:01 mr_bones_ Exp $
|
||||
|
||||
EAPI=2
|
||||
inherit flag-o-matic
|
@ -0,0 +1,129 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.7.12.28.ebuild,v 1.1 2012/03/06 22:04:20 floppym Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
PYTHON_DEPEND="2:2.6"
|
||||
|
||||
inherit eutils multilib pax-utils python toolchain-funcs
|
||||
|
||||
DESCRIPTION="Google's open source JavaScript engine"
|
||||
HOMEPAGE="http://code.google.com/p/v8"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
|
||||
LICENSE="BSD"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86 ~x64-macos ~x86-macos"
|
||||
IUSE=""
|
||||
|
||||
pkg_pretend() {
|
||||
local gccver=$(gcc-fullversion)
|
||||
if [[ ${gccver} = 4.5.2 ]]; then
|
||||
eerror "The currently selected version of gcc is known to segfault when building this"
|
||||
eerror "version of V8. Please use at least gcc-4.5.3."
|
||||
die "gcc-${gccver} detected."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
python_set_active_version 2
|
||||
python_pkg_setup
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export AR CC CXX RANLIB
|
||||
export LINK="${CXX}"
|
||||
|
||||
# Use target arch detection logic from bug #354601.
|
||||
case ${CHOST} in
|
||||
i?86-*) myarch=ia32 ;;
|
||||
x86_64-*)
|
||||
if [[ $ABI = x86 ]] ; then
|
||||
myarch=ia32
|
||||
else
|
||||
myarch=x64
|
||||
fi ;;
|
||||
arm*-*) myarch=arm ;;
|
||||
*) die "Unrecognized CHOST: ${CHOST}"
|
||||
esac
|
||||
mytarget=${myarch}.release
|
||||
|
||||
soname_version="${PV}"
|
||||
|
||||
local snapshot=on
|
||||
host-is-pax && snapshot=off
|
||||
|
||||
# TODO: Add console=readline option once implemented upstream
|
||||
# http://code.google.com/p/v8/issues/detail?id=1781
|
||||
|
||||
emake V=1 \
|
||||
library=shared \
|
||||
werror=no \
|
||||
soname_version=${soname_version} \
|
||||
snapshot=${snapshot} \
|
||||
${mytarget} || die
|
||||
|
||||
pax-mark m out/${mytarget}/{cctest,d8,shell} || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local arg testjobs
|
||||
for arg in ${MAKEOPTS}; do
|
||||
case ${arg} in
|
||||
-j*) testjobs=${arg#-j} ;;
|
||||
--jobs=*) testjobs=${arg#--jobs=} ;;
|
||||
esac
|
||||
done
|
||||
|
||||
tools/test-wrapper-gypbuild.py \
|
||||
-j${testjobs:-1} \
|
||||
--arch-and-mode=${mytarget} \
|
||||
--no-presubmit \
|
||||
--progress=dots || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto /usr
|
||||
doins -r include || die
|
||||
|
||||
dobin out/${mytarget}/d8 || die
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
install_name_tool \
|
||||
-id "${EPREFIX}"/usr/$(get_libdir)/libv8$(get_libname).${soname_version} \
|
||||
out/${mytarget}/lib.target/libv8$(get_libname).${soname_version} || die
|
||||
fi
|
||||
|
||||
dolib out/${mytarget}/lib.target/libv8$(get_libname).${soname_version} || die
|
||||
dosym libv8$(get_libname).${soname_version} /usr/$(get_libdir)/libv8$(get_libname) || die
|
||||
|
||||
dodoc AUTHORS ChangeLog || die
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
preserved_libs=()
|
||||
local baselib candidate
|
||||
|
||||
eshopts_push -s nullglob
|
||||
|
||||
for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname) \
|
||||
"${EROOT}usr/$(get_libdir)"/libv8$(get_libname).*; do
|
||||
baselib=${candidate##*/}
|
||||
if [[ ! -e "${ED}usr/$(get_libdir)/${baselib}" ]]; then
|
||||
preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
|
||||
fi
|
||||
done
|
||||
|
||||
eshopts_pop
|
||||
|
||||
if [[ ${#preserved_libs[@]} -gt 0 ]]; then
|
||||
preserve_old_lib "${preserved_libs[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ ${#preserved_libs[@]} -gt 0 ]]; then
|
||||
preserve_old_lib_notify "${preserved_libs[@]}"
|
||||
fi
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue