- self-provide osgi(slf4j.api) symbol

OBS-URL: https://build.opensuse.org/package/show/Java:packages/slf4j?expand=0&rev=11
This commit is contained in:
Michal Vyskocil 2013-09-19 14:23:19 +00:00 committed by Git OBS Bridge
parent 0e551ae199
commit 6594305388
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 19 14:22:54 UTC 2013 - mvyskocil@suse.com
- self-provide osgi(slf4j.api) symbol
-------------------------------------------------------------------
Fri Sep 13 10:51:12 UTC 2013 - mvyskocil@suse.com

View File

@ -45,6 +45,9 @@ BuildRequires: log4j
Requires: cal10n
Requires: java
Requires: javapackages-tools
# this is ugly hack, which creates package wich requires the same,
# however slf4j is not splitted between -api and -impl, but pom files are modeled as it was
Provides: osgi(slf4j.api)
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -87,6 +90,15 @@ sed -i -e "s|ant<|org.apache.ant<|g" integration/pom.xml
%{_bindir}/find -name "*.css" -o -name "*.js" -o -name "*.txt" | \
%{_bindir}/xargs -t %{__perl} -pi -e 's/\r$//g'
# The general pattern is that the API package exports API classes and does
# # not require impl classes. slf4j was breaking that causing "A cycle was
# # detected when generating the classpath slf4j.api, slf4j.nop, slf4j.api."
# # The API bundle requires impl package, so to avoid cyclic dependencies
# # during build time, it is necessary to mark the imported package as an
# # optional one.
# # Reported upstream: http://bugzilla.slf4j.org/show_bug.cgi?id=283
sed -i "/Import-Package/s/.$/;resolution:=optional&/" slf4j-api/src/main/resources/META-INF/MANIFEST.MF
%build
export CLASSPATH=$(build-classpath log4j \
commons-logging \