commit: 9c0d937d5bac3de8f4dc77cbeac0293d26ba54c7
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Tue Aug 16 10:41:12 2016 +0000
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 10:41:12 2016 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=9c0d937d
version bump
dev-dotnet/npgsql/npgsql-3.0.5_p20160114.ebuild | 164 ---------------------
...-3.0.5_p20160101.ebuild => npgsql-3.1.6.ebuild} | 26 ++--
eclass/nupkg.eclass | 56 +++++--
3 files changed, 57 insertions(+), 189 deletions(-)
diff --git a/dev-dotnet/npgsql/npgsql-3.0.5_p20160114.ebuild
b/dev-dotnet/npgsql/npgsql-3.0.5_p20160114.ebuild
deleted file mode 100644
index 89fed90..0000000
--- a/dev-dotnet/npgsql/npgsql-3.0.5_p20160114.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-# debug = debug configuration (symbols and defines for debugging)
-# developer = generate symbols information (to view line numbers in stack
traces, either in debug or release configuration)
-# test = allow NUnit tests to run
-# nupkg = create .nupkg file from .nuspec
-# gac = install into gac
-# pkg-config = register in pkg-config database
-USE_DOTNET="net45"
-IUSE="${USE_DOTNET} debug developer test +nupkg +gac +pkg-config"
-
-inherit nupkg
-
-NAME="npgsql"
-NUSPEC_ID="${NAME}"
-HOMEPAGE="https://github.com/npgsql/${NAME}"
-
-EGIT_COMMIT="5a333df0a48512ccd92f9a4b14ad75aa294d3940"
-SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${P}.zip
- mirror://gentoo/mono.snk.bz2"
-S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
-
-SLOT="0"
-
-DESCRIPTION="allows any program developed for .NET framework to access a
PostgreSQL database"
-LICENSE="npgsql"
-LICENSE_URL="https://github.com/npgsql/npgsql/blob/develop/LICENSE.txt"
-
-KEYWORDS="~amd64 ~ppc ~x86"
-COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )"
-RDEPEND="${COMMON_DEPENDENCIES}
-"
-DEPEND="${COMMON_DEPENDENCIES}
- >=dev-dotnet/nunit-2.6.4-r201501110:2[nupkg]
-"
-
-METAFILETOBUILD=src/Npgsql/Npgsql.csproj
-
-NUSPEC_FILENAME="npgsql.nuspec"
-COMMIT_DATE_INDEX=$(get_version_component_count ${PV} )
-COMMIT_DATE=$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )
-NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATE//p/.}${PR//r/}"
-
-ICON_FILENAME=postgresql-header.png
-#ICON_URL=http://www.npgsql.org/css/img/postgresql-header.png
-ICON_URL=$(get_nuget_trusted_icons_location)/${NUSPEC_ID}.${NUSPEC_VERSION}.png
-
-src_unpack() {
- default
- # Installing 'NLog 3.2.0.0'.
- # Installing 'AsyncRewriter 0.6.0'.
- # Installing 'EntityFramework 5.0.0'.
- # Installing 'EntityFramework 6.1.3'.
- # Installing 'NUnit 2.6.4'.
- enuget_download_rogue_binary "NLog" "3.2.0.0"
- enuget_download_rogue_binary "AsyncRewriter" "0.6.0"
- enuget_download_rogue_binary "EntityFramework" "5.0.0"
- enuget_download_rogue_binary "EntityFramework" "6.1.3"
- #enuget_download_rogue_binary "NUnit" "2.6.4"
-}
-
-src_prepare() {
- elog "${S}/${NUSPEC_FILENAME}"
-
- enuget_restore "${METAFILETOBUILD}"
-
- cp "${FILESDIR}/${NUSPEC_FILENAME}" "${S}/${NUSPEC_FILENAME}" || die
- patch_nuspec_file "${S}/${NUSPEC_FILENAME}"
-
- default
-}
-
-src_compile() {
- exbuild /p:SignAssembly=true
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
- if use test; then
- exbuild /p:SignAssembly=true
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk"
"test\Npgsql.Tests\Npgsql.Tests.csproj"
- fi
-
- NUSPEC_PROPS+="nuget_version=${NUSPEC_VERSION};"
- NUSPEC_PROPS+="nuget_id=${NUSPEC_ID};"
- NUSPEC_PROPS+="nuget_projectUrl=${HOMEPAGE};"
- NUSPEC_PROPS+="nuget_licenseUrl=${LICENSE_URL};"
- NUSPEC_PROPS+="nuget_description=${DESCRIPTION};"
- NUSPEC_PROPS+="nuget_iconUrl=file://${ICON_URL}"
- elog "NUSPEC_PROPS=${NUSPEC_PROPS}"
- enuspec -Prop "${NUSPEC_PROPS}" "${S}/${NUSPEC_FILENAME}"
-}
-
-src_test() {
- default
-}
-
-src_install() {
- if use debug; then
- DIR="Debug"
- else
- DIR="Release"
- fi
-
- FINAL_DLL=npgsql/bin/${DIR}/Net45/npgsql.dll
-
- if use gac; then
- egacinstall "${FINAL_DLL}"
- fi
-
- insinto "$(get_nuget_trusted_icons_location)"
- newins "${FILESDIR}/${ICON_FILENAME}"
"${NUSPEC_ID}.${NUSPEC_VERSION}.png"
-
- enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg"
-
- install_pc_file
-}
-
-patch_nuspec_file()
-{
- if use nupkg; then
- if use debug; then
- DIR="Debug"
- else
- DIR="Release"
- fi
-FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
- <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
- <file src="npgsql/bin/${DIR}/Net45/Newtonsoft.Json.*"
target="lib\net45\" />
- </files>
-EOF
-`
- einfo ${FILES_STRING}
- replace "</package>" "${FILES_STRING}</package>" -- $1 || die
"replace at patch_nuspec_file()"
- fi
-}
-
-PC_FILE_NAME=${PN}
-
-install_pc_file()
-{
- if use pkg-config; then
- dodir /usr/$(get_libdir)/pkgconfig
- ebegin "Installing ${PC_FILE_NAME}.pc file"
- sed \
- -e "s:@LIBDIR@:$(get_libdir):" \
- -e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \
- -e "s:@DESCRIPTION@:${DESCRIPTION}:" \
- -e "s:@VERSION@:${PV}:" \
- -e
's*@LIBS@*-r:${libdir}'"/mono/${PC_FILE_NAME}/npgsql.dll"'*' \
- <<\EOF
>"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die
-prefix=${pcfiledir}/../..
-exec_prefix=${prefix}
-libdir=${exec_prefix}/@LIBDIR@
-Name: @PACKAGENAME@
-Description: @DESCRIPTION@
-Version: @VERSION@
-Libs: @LIBS@
-EOF
-
- einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/"
pkg-config --exists "${PC_FILE_NAME}"
- PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config
--exists "${PC_FILE_NAME}" || die ".pc file failed to validate."
- eend $?
- fi
-}
diff --git a/dev-dotnet/npgsql/npgsql-3.0.5_p20160101.ebuild
b/dev-dotnet/npgsql/npgsql-3.1.6.ebuild
similarity index 88%
rename from dev-dotnet/npgsql/npgsql-3.0.5_p20160101.ebuild
rename to dev-dotnet/npgsql/npgsql-3.1.6.ebuild
index 6b91ae7..dd8c8ea 100644
--- a/dev-dotnet/npgsql/npgsql-3.0.5_p20160101.ebuild
+++ b/dev-dotnet/npgsql/npgsql-3.1.6.ebuild
@@ -19,9 +19,10 @@ NAME="npgsql"
NUSPEC_ID="${NAME}"
HOMEPAGE="https://github.com/npgsql/${NAME}"
-EGIT_COMMIT="25703d852a5fed28dde238e2312c982482ea91e0"
-SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${P}.zip
- mirror://gentoo/mono.snk.bz2"
+EGIT_COMMIT="a7e147759c3756b6d22f07f5602aacd21f93d48d"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
+ gac? ( mirror://gentoo/mono.snk.bz2 )"
+RESTRICT="mirror"
S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
SLOT="0"
@@ -31,14 +32,18 @@ LICENSE="npgsql"
LICENSE_URL="https://github.com/npgsql/npgsql/blob/develop/LICENSE.txt"
KEYWORDS="~amd64 ~ppc ~x86"
-COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )"
+COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )
+ nupkg? ( dev-util/nunit )
+"
RDEPEND="${COMMON_DEPENDENCIES}
"
DEPEND="${COMMON_DEPENDENCIES}
- >=dev-dotnet/nunit-2.6.4-r201501110:2[nupkg]
+ nupkg? ( dev-util/nunit:2[nupkg] )
+ !nupkg? ( dev-util/nunit:2 )
"
-METAFILETOBUILD=src/Npgsql/Npgsql.csproj
+NPGSQL_CSPROJ=src/Npgsql/Npgsql.csproj
+METAFILETOBUILD=${NPGSQL_CSPROJ}
NUSPEC_FILENAME="npgsql.nuspec"
COMMIT_DATE_INDEX=$(get_version_component_count ${PV} )
@@ -50,7 +55,6 @@ ICON_FILENAME=postgresql-header.png
ICON_URL=$(get_nuget_trusted_icons_location)/${NUSPEC_ID}.${NUSPEC_VERSION}.png
src_unpack() {
- default
# Installing 'NLog 3.2.0.0'.
# Installing 'AsyncRewriter 0.6.0'.
# Installing 'EntityFramework 5.0.0'.
@@ -61,6 +65,7 @@ src_unpack() {
enuget_download_rogue_binary "EntityFramework" "5.0.0"
enuget_download_rogue_binary "EntityFramework" "6.1.3"
#enuget_download_rogue_binary "NUnit" "2.6.4"
+ default
}
src_prepare() {
@@ -75,9 +80,10 @@ src_prepare() {
}
src_compile() {
+ #exbuild /t:RewriteAsync "${NPGSQL_CSPROJ}"
exbuild /p:SignAssembly=true
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
if use test; then
- exbuild /p:SignAssembly=true
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk"
"test\Npgsql.Tests\Npgsql.Tests.csproj"
+ exbuild /p:SignAssembly=true
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk"
"test/Npgsql.Tests/Npgsql.Tests.csproj"
fi
NUSPEC_PROPS+="nuget_version=${NUSPEC_VERSION};"
@@ -101,7 +107,7 @@ src_install() {
DIR="Release"
fi
- FINAL_DLL=npgsql/bin/${DIR}/Net45/npgsql.dll
+ FINAL_DLL=src/Npgsql/bin/${DIR}/Npgsql.dll
if use gac; then
egacinstall "${FINAL_DLL}"
@@ -125,7 +131,7 @@ patch_nuspec_file()
fi
FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
<files> <!-- https://docs.nuget.org/create/nuspec-reference -->
- <file src="npgsql/bin/${DIR}/Net45/Newtonsoft.Json.*"
target="lib\net45\" />
+ <file src="src/Npgsql/bin/${DIR}/Npgsql.dll"
target="lib\net45\" />
</files>
EOF
`
diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass
index 3234c99..3008e2d 100644
--- a/eclass/nupkg.eclass
+++ b/eclass/nupkg.eclass
@@ -9,6 +9,14 @@
inherit dotnet
+# @FUNCTION: get_nuget_trusted_icons_location
+# @USAGE: [directory]
+# @DESCRIPTION:
+# returns base directory for monodevelop addin icons
+get_nuget_trusted_icons_location() {
+ echo $(get_nuget_trusted_archives_location)/icons
+}
+
# @FUNCTION: get_nuget_trusted_archives_location
# @USAGE: [directory]
# @DESCRIPTION:
@@ -24,12 +32,19 @@ get_nuget_trusted_archives_location() {
fi
}
-# @FUNCTION: get_nuget_trusted_icons_location
+# @FUNCTION: get_nuget_trusted_archives_location
# @USAGE: [directory]
# @DESCRIPTION:
-# returns base directory for monodevelop addin icons
-get_nuget_trusted_icons_location() {
- echo $(get_nuget_trusted_archives_location)/icons
+# returns base directory for various nuget folders.
+get_nuget_untrusted_archives_location() {
+ if [ -d "/var/calculate/remote/distfiles" ]; then
+ # Control will enter here if the directory exist.
+ # this is necessary to handle calculate linux profiles feature
(for corporate users)
+ echo /var/calculate/remote/packages/NuGet/nuget.org
+ else
+ # this is for all normal gentoo-based distributions
+ echo /usr/local/nuget/downloads/nuget.org
+ fi
}
# @FUNCTION: get_nuget_trusted_unpacked_location
@@ -40,7 +55,7 @@ get_nuget_trusted_unpacked_location() {
if [ -d "/var/calculate/remote/distfiles" ]; then
# Control will enter here if the directory exist.
# this is necessary to handle calculate linux profiles feature
(for corporate users)
- echo /var/calculate/remote/distfiles/NuGet
+ echo /var/calculate/remote/distfiles/NuGet/packages
else
# this is for all normal gentoo-based distributions
echo /usr/local/nuget/packages
@@ -54,22 +69,33 @@ enuget_restore() {
nuget restore "$@" || die
}
+CONFIG_PATH=${T}/.nuget
+CONFIG_NAME=NuGet.Config
+
# @FUNCTION: enuget_download_rogue_binary
# @DESCRIPTION: downloads a binary package from 3rd untrusted party repository
# accepts Id of package as parameter
enuget_download_rogue_binary() {
- einfo "Downloading rogue binary '$1' into '${T}/$1.$2.nupkg'"
- wget -c https://www.nuget.org/api/v2/package/$1/$2
--directory-prefix="${T}/" --output-document="$1.$2.nupkg" || die
+ einfo "Downloading rogue binary '$1'"
+ addwrite "$(get_nuget_untrusted_archives_location)" || die
+ mkdir -p "$(get_nuget_untrusted_archives_location)" || die
+ einfo wget --continue https://www.nuget.org/api/v2/package/$1/$2
--output-document="$(get_nuget_untrusted_archives_location)/$1.$2.nupkg"
+ wget --continue https://www.nuget.org/api/v2/package/$1/$2
--output-document="$(get_nuget_untrusted_archives_location)/$1.$2.nupkg" || die
# -p ignores directory if it is already exists
- mkdir -p "${T}/NuGet/" || die
- echo <<\EOF >"${T}/NuGet/NuGet.Config" || die
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration><config>
-<add key="repositoryPath" value="${T}" />
-</config></configuration>
-EOF
+ mkdir -p "${CONFIG_PATH}/" || die
+ cat <<-EOF >"${CONFIG_PATH}/${CONFIG_NAME}" || die
+ <?xml version="1.0" encoding="utf-8" ?>
+ <configuration>
+ <config>
+ <add key="repositoryPath"
value="$(get_nuget_untrusted_archives_location)" />
+ </config>
+ <disabledPackageSources />
+ </configuration>
+ EOF
einfo "Installing rogue binary '$1' into '${S}/packages'"
- nuget install "$1" -Version "$2" -OutputDirectory "${S}/packages"
+ einfo "$(pwd)"
+ einfo nuget install "$1" -Version "$2" -SolutionDirectory "${S}"
-ConfigFile "${CONFIG_PATH}/${CONFIG_NAME}" -OutputDirectory "${S}/packages"
-Verbosity detailed
+ nuget install "$1" -Version "$2" -SolutionDirectory "${T}"
-ConfigFile "${CONFIG_PATH}/${CONFIG_NAME}" -OutputDirectory "${S}/packages"
-Verbosity detailed || die
}
# @FUNCTION: enuspec