Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assimp, new recipe, wip #1645

Merged
merged 1 commit into from Sep 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 73 additions & 0 deletions media-libs/assimp/assimp-4.0.1.recipe
@@ -0,0 +1,73 @@
SUMMARY="Importer library to import assets from 3D files"
DESCRIPTION="Open Asset Import Library (short name: Assimp) is a portable \
Open Source library to import various well-known 3D model formats in a \
uniform manner. The most recent version also knows how to export 3d files \
and is therefore suitable as a general-purpose 3D model converter."
HOMEPAGE="https://github.com/assimp/assimp"
COPYRIGHT="2006-2016, assimp team"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/assimp/assimp/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256='60080d8ab4daaab309f65b3cffd99f19eb1af8d05623fff469b9b652818e286e'

ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
assimp$secondaryArchSuffix = $portVersion
cmd:assimp$secondaryArchSuffix
lib:libassimp$secondaryArchSuffix = 4.0.1 compat >= 4
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libminizip$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"

PROVIDES_devel="
assimp${secondaryArchSuffix}_devel = $portVersion
devel:libassimp$secondaryArchSuffix = 4.0.1 compat >= 4
"
REQUIRES_devel="
assimp$secondaryArchSuffix == $portVersion base
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libminizip$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"

BUILD()
{
mkdir -p build
cd build
cmake -DASSIMP_BIN_INSTALL_DIR=$binDir \
-DASSIMP_LIB_INSTALL_DIR=$libDir \
-DASSIMP_INCLUDE_INSTALL_DIR=$includeDir ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These INSTALL_DIR could theorically be replaced by $cmakeDirArgs, provided that https://github.com/assimp/assimp/blob/master/CMakeLists.txt#L186 is extended: if( UNIX or HAIKU )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to look into this how to use it ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be: cmake $cmakeDirArgs ..

provided that https://github.com/assimp/assimp/blob/master/CMakeLists.txt#L186 is extended: if( UNIX or HAIKU )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the part of " cmake $cmakeDirArgs .. ", just not sure how to extend the correct way of extending ( UNIX or HAIKU ) ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS, not too familiar with cmake myself ...

Copy link
Member

@extrowerk extrowerk Sep 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Miqlas right, wasn't aware of it. Then it should just work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not using the INSTALL_DIR options fails on x86_gcc2 for secondaryArchSuffix ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Begasus, fine, the packages don't always correctly use the first provided by cmakeDirArgs. Ok to merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from removing DevIL from the recipe it builds ok here, miqlas tested the build on x86_64 :)

make $jobArgs
}

INSTALL()
{
cd build
make install

prepareInstalledDevelLib libassimp

fixPkgconfig

packageEntries devel \
$developDir
}