summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Puskas <zoltan@sinustrom.info>2017-05-24 00:27:57 -0700
committerMichał Górny <mgorny@gentoo.org>2017-05-24 13:03:03 +0200
commit36472532e3a7f50913a18c8dd5199279b01de709 (patch)
treea416c80d68a947ce98f1a47ebc9a24dde03cc6f8 /sci-electronics
parentsci-electronics/kicad: Bump to 4.0.6 version, #614268 (diff)
downloadgentoo-36472532e3a7f50913a18c8dd5199279b01de709.tar.gz
gentoo-36472532e3a7f50913a18c8dd5199279b01de709.tar.bz2
gentoo-36472532e3a7f50913a18c8dd5199279b01de709.zip
sci-electronics/kicad-4.0.5: Backport ebuild updates from 4.0.6, #617092
Backported new upstream boost patches, use python fixes, cmake flag fixes, l10n migration, examples location, and x11-libs/wxGTK dependecy fixes. Keeping around this version as per user requests. Closes: https://github.com/gentoo/gentoo/pull/4531 Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/kicad/kicad-4.0.5-r1.ebuild (renamed from sci-electronics/kicad/kicad-4.0.5.ebuild)44
1 files changed, 14 insertions, 30 deletions
diff --git a/sci-electronics/kicad/kicad-4.0.5.ebuild b/sci-electronics/kicad/kicad-4.0.5-r1.ebuild
index f94633ba0643..3e7cb453e509 100644
--- a/sci-electronics/kicad/kicad-4.0.5.ebuild
+++ b/sci-electronics/kicad/kicad-4.0.5-r1.ebuild
@@ -10,7 +10,6 @@ inherit cmake-utils eutils flag-o-matic gnome2-utils python-single-r1 wxwidgets
DESCRIPTION="Electronic Schematic and PCB design tools."
HOMEPAGE="http://www.kicad-pcb.org"
-LIBCONTEXT_COMMIT="3d92a1a50f4749b5a92131a957c9615473be85b4"
SERIES=$(get_version_component_range 1-2)
@@ -19,29 +18,27 @@ SRC_URI="https://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.xz
http://downloads.kicad-pcb.org/libraries/${PN}-footprints-${PV}.tar.gz
http://downloads.kicad-pcb.org/libraries/kicad-library-${PV}.tar.gz
)
- i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )
- https://github.com/twlostow/libcontext/archive/${LIBCONTEXT_COMMIT}.tar.gz -> ${PN}-libcontext.tar.gz"
+ i18n? ( https://github.com/KiCad/${PN}-i18n/archive/${PV}.tar.gz -> ${P}-i18n.tar.gz )"
LICENSE="GPL-2+ GPL-3+ Boost-1.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc examples github i18n libressl minimal +python"
-LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh_CN"
+LANGS="bg ca cs de el es fi fr hu it ja ko nl pl pt ru sk sl sv zh-CN"
for lang in ${LANGS} ; do
- IUSE="${IUSE} linguas_${lang}"
+ IUSE="${IUSE} l10n_${lang}"
done
unset lang
-unset LANGS
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )"
-COMMON_DEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+COMMON_DEPEND=">=x11-libs/wxGTK-3.0.2:${WX_GTK_VER}[X,opengl]
python? (
dev-python/wxpython:${WX_GTK_VER}[opengl,${PYTHON_USEDEP}]
${PYTHON_DEPS}
)
- >=dev-libs/boost-1.56[nls,threads,python?,${PYTHON_USEDEP}]
+ >=dev-libs/boost-1.61[context,nls,threads,python?,${PYTHON_USEDEP}]
github? (
libressl? ( dev-libs/libressl:0= )
!libressl? ( dev-libs/openssl:0= )
@@ -59,21 +56,15 @@ RDEPEND="${COMMON_DEPEND}
sci-electronics/electronics-menu"
pkg_setup() {
- python-single-r1_pkg_setup
+ use python && python-single-r1_pkg_setup
setup-wxwidgets
}
src_prepare() {
xdg_src_prepare
- # Add separated out libcontext files and patch source to use them
- mkdir -p "${S}/common/system/" || die
- mkdir -p "${S}/include/system/" || die
- cp "${WORKDIR}/${PN}-libcontext/libcontext.cpp" "${S}/common/system/libcontext.cpp" || die
- cp "${WORKDIR}/${PN}-libcontext/libcontext.h" "${S}/include/system/libcontext.h" || die
- # Path source to use new "built in" libcontext. Also patch libcontext.cpp to have correct include file.
- # Path must be applied after new libcontext files have been copied to the kicad source directory.
- eapply "${FILESDIR}/${PN}-4.0.4-boost-context.patch"
+ # Patch to work with >=boost 1.61
+ eapply "${FILESDIR}/${PN}-boost-1.61.patch"
# remove all the non unix file endings
while IFS="" read -d $'\0' -r f; do
@@ -107,10 +98,11 @@ src_prepare() {
ln -s "${WORKDIR}/${P}-i18n" "${S}/${PN}-i18n" || die
# Remove unused languages. Project generates only languages specified in the
# file in LINGUAS in the subproject folder. By default all languages are added
- # so we sed out the unused ones based on the user linguas_* settings.
+ # so we sed out the unused ones based on the user l10n_* settings.
local lang
for lang in ${LANGS}; do
- if ! use linguas_${lang}; then
+ if ! use l10n_${lang}; then
+ lang="${lang//-/_}" # Needed to turn zh-CN to zh_CN as KiCad does not follow l10n standard here
sed "/${lang}/d" -i ${PN}-i18n/LINGUAS || die
fi
done
@@ -124,14 +116,8 @@ src_prepare() {
sed '/make uninstall/,$d' -i ${PN}-i18n/CMakeLists.txt || die
fi
- # Install examples in the right place if requested
- if use examples; then
- # install demos into the examples folder too
- sed -e 's:${KICAD_DATA}/demos:${KICAD_DOCS}/examples:' -i CMakeLists.txt || die
- else
- # remove additional demos/examples as its not strictly required to run the binaries
- sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die
- fi
+ # Install examples if requested
+ use examples || sed -e '/add_subdirectory( demos )/d' -i CMakeLists.txt || die
# Add important missing doc files
sed -e 's/INSTALL.txt/AUTHORS.txt CHANGELOG.txt README.txt TODO.txt/' -i CMakeLists.txt || die
@@ -145,8 +131,6 @@ src_configure() {
-DPYTHON_LIBRARY="$(python_get_library_path)"
-DKICAD_DOCS="/usr/share/doc/${PF}"
-DKICAD_HELP="/usr/share/doc/${PF}/help"
- -DKICAD_REPO_NAME="stable"
- -DKICAD_BUILD_VERSION="${PV}"
-DwxUSE_UNICODE=ON
-DKICAD_SKIP_BOOST=ON
-DBUILD_GITHUB_PLUGIN="$(usex github)"
@@ -154,6 +138,7 @@ src_configure() {
-DKICAD_SCRIPTING_MODULES="$(usex python)"
-DKICAD_SCRIPTING_WXPYTHON="$(usex python)"
-DKICAD_I18N_UNIX_STRICT_PATH="$(usex i18n)"
+ -DCMAKE_CXX_FLAGS="-std=c++11"
)
if use debug; then
append-cxxflags "-DDEBUG"
@@ -181,7 +166,6 @@ src_install() {
pkg_preinst() {
xdg_pkg_preinst
- gnome2_icon_savelist
}
pkg_postinst() {