public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/dotnet:master commit in: www-apache/mod_mono/, eclass/, www-apache/mod_mono/files/
@ 2016-07-31  8:52 Mikhail Pukhlikov
  0 siblings, 0 replies; only message in thread
From: Mikhail Pukhlikov @ 2016-07-31  8:52 UTC (permalink / raw
  To: gentoo-commits

commit:     5be38726e319c9d6bf7794bb1e6d63a0ff5d7076
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Sat Jul 30 13:17:48 2016 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Sat Jul 30 13:17:48 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=5be38726

remove calls to base from go-mono.eclass

 eclass/go-mono.eclass                              | 136 +++++++++++++++++++
 .../mod_mono/files/mod_mono-2.10-apache-2.4.patch  | 146 ---------------------
 ...mono-2.10-r1.ebuild => mod_mono-3.12-r1.ebuild} |   9 +-
 3 files changed, 142 insertions(+), 149 deletions(-)

diff --git a/eclass/go-mono.eclass b/eclass/go-mono.eclass
new file mode 100644
index 0000000..5ae2264
--- /dev/null
+++ b/eclass/go-mono.eclass
@@ -0,0 +1,136 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: go-mono.eclass
+# @MAINTAINER:
+# dotnet@gentoo.org
+# @BLURB: Common functionality for go-mono.org apps
+# @DESCRIPTION:
+# Common functionality needed by all go-mono.org apps.
+
+inherit versionator mono
+
+PRE_URI="http://mono.ximian.com/monobuild/preview/sources"
+
+GIT_PN="${PN/mono-debugger/debugger}"
+
+ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src/mono"
+
+GO_MONO_SUB_BRANCH=${GO_MONO_SUB_BRANCH}
+
+if [[ "${PV%_rc*}" != "${PV}" ]]
+then
+	GO_MONO_P="${P%_rc*}"
+	SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
+	S="${WORKDIR}/${GO_MONO_P}"
+elif [[ "${PV%_pre*}" != "${PV}" ]]
+then
+	GO_MONO_P="${P%_pre*}"
+	SRC_URI="${PRE_URI}/${PN}/${GO_MONO_P}.tar.bz2 -> ${P}.tar.bz2"
+	S="${WORKDIR}/${GO_MONO_P}"
+elif [[ "${PV}" == "9999" ]]
+then
+	GO_MONO_P=${P}
+	EGIT_REPO_URI="https://github.com/mono/${GIT_PN}.git"
+	SRC_URI=""
+	inherit autotools git
+elif [[ "${PV%.9999}" != "${PV}" ]]
+then
+	GO_MONO_P=${P}
+	EGIT_REPO_URI="https://github.com/mono/${GIT_PN}.git"
+	EGIT_BRANCH="mono-$(get_version_component_range 1)-$(get_version_component_range 2)${GO_MONO_SUB_BRANCH}"
+	SRC_URI=""
+	inherit autotools git
+else
+	GO_MONO_P=${P}
+	SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+fi
+
+
+NO_MONO_DEPEND=( "dev-lang/mono" "dev-dotnet/libgdiplus" "dev-dotnet/gluezilla" )
+
+if [[ "$(get_version_component_range 3)" != "9999" ]]
+then
+	GO_MONO_REL_PV="$(get_version_component_range 1-2)"
+
+else
+	GO_MONO_REL_PV="${PV}"
+fi
+
+if ! has "${CATEGORY}/${PN}" "${NO_MONO_DEPEND[@]}"
+then
+	RDEPEND=">=dev-lang/mono-${GO_MONO_REL_PV}"
+	DEPEND="${RDEPEND}"
+fi
+
+DEPEND="${DEPEND}
+	virtual/pkgconfig"
+
+# @FUNCTION: go-mono_src_unpack
+# @DESCRIPTION:
+# Runs default()
+go-mono_src_unpack() {
+	if [[ "${PV%.9999}" != "${PV}" ||  "${PV}" == "9999" ]]
+	then
+		default
+		git_src_unpack
+	else
+		default
+	fi
+}
+
+# @FUNCTION: go-mono_src_prepare
+# @DESCRIPTION:
+# Runs autopatch from base.eclass, if PATCHES is set.
+go-mono_src_prepare() {
+	if [[ "${PV%.9999}" != "${PV}" ||  "${PV}" == "9999" ]]
+	then
+		default
+		[[ "$EAUTOBOOTSTRAP" != "no" ]] && eautoreconf
+	else
+		default
+	fi
+}
+
+# @FUNCTION: go-mono_src_configure
+# @DESCRIPTION:
+# Runs econf, disabling static libraries and dependency-tracking.
+go-mono_src_configure() {
+	econf	--disable-dependency-tracking		\
+		--disable-static			\
+		"$@"
+}
+
+# @FUNCTION: go-mono_src_compile
+# @DESCRIPTION:
+# Runs emake.
+go-mono_src_compile() {
+	emake "$@" || die "emake failed"
+}
+
+# @ECLASS-VARIABLE: DOCS
+# @DESCRIPTION:
+# Insert path of docs you want installed. If more than one,
+# consider using an array.
+
+# @FUNCTION: go-mono_src_install
+# @DESCRIPTION:
+# Rune emake, installs common doc files, if DOCS is
+# set, installs those. Gets rid of .la files.
+go-mono_src_install () {
+	emake -j1 DESTDIR="${D}" "$@" install || die "install failed"
+	mono_multilib_comply
+	local	commondoc=( AUTHORS ChangeLog README TODO )
+	for docfile in "${commondoc[@]}"
+	do
+		[[ -e "${docfile}" ]] && dodoc "${docfile}"
+	done
+	if [[ "${DOCS[@]}" ]]
+	then
+		dodoc "${DOCS[@]}" || die "dodoc DOCS failed"
+	fi
+	find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
+}
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install

diff --git a/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch b/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch
deleted file mode 100644
index 86694bf..0000000
--- a/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-Sólo en mod_mono-2.10.new/: attachment.cgi?id=402888
-diff -ur mod_mono-2.10/configure.in mod_mono-2.10.new/configure.in
---- mod_mono-2.10/configure.in	2011-01-13 23:32:35.000000000 +0100
-+++ mod_mono-2.10.new/configure.in	2015-06-07 21:09:26.417127319 +0200
-@@ -336,6 +336,16 @@
- ], [
- ])
- 
-+AC_TRY_RUN([
-+	#include <ap_release.h>
-+	int main ()
-+	{
-+		return (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER == 4) ? 0 : 1;
-+	}
-+], [
-+	APACHE_VER=2.4
-+], [
-+])
- fi
- 
- if test ! "$APACHE_VER" = "1.3" -a ! "$APACHE_VER" = "retry" ; then
-@@ -385,6 +395,10 @@
- 	AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ])
- fi
- 
-+if test "$APACHE_VER" = "2.4" ; then
-+	AC_DEFINE([APACHE24],,[Compiling for Apache >= 2.4 ])
-+fi
-+
- # check for --with-mono-default-config-dir
- DFLT_MONO_CONFIG_DIR=`$APXS -q SYSCONFDIR`/mod-mono-applications
- AC_ARG_WITH(mono-default-config-dir,
-diff -ur mod_mono-2.10/src/mod_mono.c mod_mono-2.10.new/src/mod_mono.c
---- mod_mono-2.10/src/mod_mono.c	2011-01-13 23:32:35.000000000 +0100
-+++ mod_mono-2.10.new/src/mod_mono.c	2015-06-07 21:09:26.421127351 +0200
-@@ -386,7 +386,11 @@
- apache_get_userid ()
- {
- #ifdef HAVE_UNIXD
--	return unixd_config.user_id;
-+#if defined(APACHE24)
-+  return ap_unixd_config.user_id;
-+#else
-+  return unixd_config.user_id;
-+#endif
- #else
- 	return ap_user_id;
- #endif
-@@ -396,7 +400,11 @@
- apache_get_groupid ()
- {
- #ifdef HAVE_UNIXD
--	return unixd_config.group_id;
-+#if defined(APACHE24)
-+	return ap_unixd_config.user_id;
-+#else
-+  return unixd_config.user_id;
-+#endif
- #else
- 	return ap_group_id;
- #endif
-@@ -406,7 +414,11 @@
- apache_get_username ()
- {
- #ifdef HAVE_UNIXD
-+#if defined(APACHE24)
-+	return ap_unixd_config.user_name;
-+#else 
- 	return unixd_config.user_name;
-+#endif
- #else
- 	return ap_user_name;
- #endif
-@@ -485,8 +497,12 @@
- 
- #if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
- 		DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
-+#if defined(APACHE24)
-+		rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
-+#else 
- 		rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex);
--		if (rv != APR_SUCCESS) {
-+#endif
-+    if (rv != APR_SUCCESS) {
- 			ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
- 				      "Failed to set mutex permissions for %s",
- 				      xsp->dashboard_lock_file);
-@@ -850,10 +866,14 @@
- #if defined(APACHE22)
- 	return c->remote_addr->port;
- #else
-+#if defined(APACHE24)
-+  return c->client_addr->port;
-+#else 
- 	apr_port_t port;
- 	apr_sockaddr_port_get (&port, c->remote_addr);
- 	return port;
- #endif
-+#endif
- 
- }
- 
-@@ -863,10 +883,14 @@
- #if defined(APACHE22)
- 	return r->connection->local_addr->port;
- #else
-+#if defined(APACHE24)
-+	return r->connection->local_addr->port;
-+#else
- 	apr_port_t port;
- 	apr_sockaddr_port_get (&port, r->connection->local_addr);
- 	return port;
- #endif
-+#endif
- }
- 
- static const char *
-@@ -1977,9 +2001,12 @@
- 	size += info.local_ip_len + sizeof (int32_t);
- 
- 	size += sizeof (int32_t);
--
--	info.remote_ip_len = strlen (r->connection->remote_ip);
--	size += info.remote_ip_len + sizeof (int32_t);
-+#if defined(APACHE24)
-+  info.remote_ip_len = strlen (r->connection->client_ip);
-+#else 
-+  info.remote_ip_len = strlen (r->connection->remote_ip);
-+#endif
-+  size += info.remote_ip_len + sizeof (int32_t);
- 
- 	size += sizeof (int32_t);
- 
-@@ -2026,7 +2053,11 @@
- 	i = LE_FROM_INT (i);
- 	memcpy (ptr, &i, sizeof (i));
- 	ptr += sizeof (int32_t);
-+#if defined(APACHE24)
-+	ptr += write_string_to_buffer (ptr, 0, r->connection->client_ip, info.remote_ip_len);
-+#else 
- 	ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len);
-+#endif
- 	i = connection_get_remote_port (r->connection);
- 	i = LE_FROM_INT (i);
- 	memcpy (ptr, &i, sizeof (i));
-Sólo en mod_mono-2.10.new/src: mod_mono.c.orig

diff --git a/www-apache/mod_mono/mod_mono-2.10-r1.ebuild b/www-apache/mod_mono/mod_mono-3.12-r1.ebuild
similarity index 85%
rename from www-apache/mod_mono/mod_mono-2.10-r1.ebuild
rename to www-apache/mod_mono/mod_mono-3.12-r1.ebuild
index 48caacb..c7463f8 100644
--- a/www-apache/mod_mono/mod_mono-2.10-r1.ebuild
+++ b/www-apache/mod_mono/mod_mono-3.12-r1.ebuild
@@ -5,7 +5,7 @@
 EAPI=6
 
 # Watch the order of these!
-inherit autotools apache-module eutils mono
+inherit autotools apache-module eutils go-mono mono
 
 KEYWORDS="~amd64 ~x86"
 
@@ -14,6 +14,10 @@ HOMEPAGE="http://www.mono-project.com/Mod_mono"
 LICENSE="Apache-2.0"
 SLOT="0"
 IUSE="debug"
+EGIT_COMMIT="f21ce5a86a610aba053042324970706a9c424681"
+SRC_URI="https://github.com/mono/mod_mono/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz"
+RESTRICT="mirror"
+S="${WORKDIR}/mod_mono-${EGIT_COMMIT}"
 
 CDEPEND=""
 DEPEND="${CDEPEND}"
@@ -32,8 +36,6 @@ src_prepare() {
 	sed -e "s:@LIBDIR@:$(get_libdir):" "${FILESDIR}/${APACHE2_MOD_CONF}.conf" \
 		> "${WORKDIR}/${APACHE2_MOD_CONF##*/}.conf" || die
 
-	epatch "${FILESDIR}"/${PN}-2.10-apache-2.4.patch
-
 	eautoreconf
 	go-mono_src_prepare
 }
@@ -46,6 +48,7 @@ src_configure() {
 		--with-apr-config="/usr/bin/apr-1-config" \
 		--with-apu-config="/usr/bin/apu-1-config"
 }
+
 src_compile() {
 	go-mono_src_compile
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-31  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31  8:52 [gentoo-commits] proj/dotnet:master commit in: www-apache/mod_mono/, eclass/, www-apache/mod_mono/files/ Mikhail Pukhlikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox