packaging netgen6.2 for ubuntu

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: packaging netgen6.2 for ubuntu

Postby looo » Thu Sep 28, 2017 9:09 am

BTW.: I disabled python-bindings to support both py3 and py2. netgen itself, doesn't support python2 although with some patching this would be achievable, but I don't have the motivation to do this. Also I think we should try to move to python3 anyway.... :D
gdo35
Posts: 189
Joined: Wed Jan 25, 2012 7:25 pm

Re: packaging netgen6.2 for ubuntu

Postby gdo35 » Thu Sep 28, 2017 9:29 am

Hi,

looo, your debian/rules file is very complex.

You should use debianhelper --buildsystem option.

Your debian/rules should looks like :

Code: Select all

#!/usr/bin/make -f

override_dh_auto_configure:
                dh_auto_configure -- \
                        -DCMAKE_BUILD_TYPE=Release \
                        -DUSE_OCC=ON \
                        -DUSE_PYTHON=OFF \
                        -DUSE_GUI=ON \
                        -DUSE_SUPERBUILD=OFF

%:
            dh $@ --buildsystem=cmake
Build is running here based on your github repository.

After that you have to fullfill debian/*.fles and debian/control according to what you want in your packages. But it should be close to what I have done for 5.3.1.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: packaging netgen6.2 for ubuntu

Postby looo » Thu Sep 28, 2017 10:11 am

thanks, your suggestion solved the previous problem. Seems the debianhelper are the way to proceed.
After that you have to fullfill debian/*.fles and debian/control according to what you want in your packages.
I don't want to sepperate the package. Locally it now creates a package with everything included. If ppa now does the same I am happy :)
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: packaging netgen6.2 for ubuntu

Postby looo » Thu Sep 28, 2017 11:48 am

a package for trusty should be available: (xenial will be available soon)

Code: Select all

sudo add-apt-repository ppa:sppedflyer/mytestppa1
sudo apt-get update
sudo apt-get install netgen
can we adopt one of the travis builds to use occt7.1.0 and netgen6.2 to see what is missing for freecad to build with this new netgen package?

@gdo35 Feel free to modify my package... This was really made fast and dirty without too much knowledge of all the debian-packaging stuff. But I would like to go on and do not spend too much time on this. The goal is to get ubuntu ready for qt5/py3 which will most-likely defines the dependencies of the next release.
User avatar
sgrogan
Posts: 5813
Joined: Wed Oct 22, 2014 5:02 pm

Re: packaging netgen6.2 for ubuntu

Postby sgrogan » Thu Sep 28, 2017 4:11 pm

looo wrote:
Thu Sep 28, 2017 11:48 am
can we adopt one of the travis builds to use occt7.1.0 and netgen6.2 to see what is missing for freecad to build with this new netgen package?
I can do this on my PPA in a few hours.
User avatar
sgrogan
Posts: 5813
Joined: Wed Oct 22, 2014 5:02 pm

Re: packaging netgen6.2 for ubuntu

Postby sgrogan » Thu Sep 28, 2017 8:16 pm

looo wrote:
Thu Sep 28, 2017 11:48 am
netgen6.2 to see what is missing for freecad to build with this new netgen package?
My PPA build failed https://launchpadlibrarian.net/33905997 ... ING.txt.gz
It looks like CMake can't find the netgen-headers. @looo, are you sure these are included in your package? Sorry my internet is still tethered to my phone so I can't download the package and look.

We are also going to have a problem with the package name being "netgen" it's going to conflict with the users system, more so because the package isn't split like the standard repo's version is. I'm not sure if splitting the package is necessary, but maybe we can rename the package netgen6? It needs to be done everywhere in the deb folder files.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: packaging netgen6.2 for ubuntu

Postby looo » Thu Sep 28, 2017 9:17 pm

thanks for testing. maybe you have to specify the headers with:

Code: Select all

      -DNETGENDATA=/usr/include/netgen \
      -DNETGEN_INCLUDEDIR=/usr/include/netgen \
      -DNGLIB_INCLUDE_DIR=/usr/include/netgen/nglib \
or similar. for conda I have to do the same...

I dont really understand why we have to rename netgen. It's a replacement of netgen, so it should be named the same.
User avatar
sgrogan
Posts: 5813
Joined: Wed Oct 22, 2014 5:02 pm

Re: packaging netgen6.2 for ubuntu

Postby sgrogan » Thu Sep 28, 2017 9:25 pm

looo wrote:
Thu Sep 28, 2017 9:17 pm
or similar. for conda I have to do the same...
I'll try this.
looo wrote:
Thu Sep 28, 2017 9:17 pm
I dont really understand why we have to rename netgen. It's a replacement of netgen, so it should be named the same.
apt will not handle the dependencies the same because the package isn't split. In addition the FreeCAd stable package needs to use the old default netgen 4.9.x, if the default netgen is over-written any program that depends on this will break. I don't know how many other packages depend on netgen, Salome maybe? And those that do probably depend on oce/occt one level deeper. AppImage and Conda look better everyday :)
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: packaging netgen6.2 for ubuntu

Postby looo » Fri Sep 29, 2017 7:31 am

sgrogan wrote:apt will not handle the dependencies the same because the package isn't split. In addition the FreeCAd stable package needs to use the old default netgen 4.9.x, if the default netgen is over-written any program that depends on this will break. I don't know how many other packages depend on netgen, Salome maybe? And those that do probably depend on oce/occt one level deeper. AppImage and Conda look better everyday
The package is not dependent on the headers of occt only the libraries of occt are needed. Maybe this is wrong and a seperate header package should be used, but as this is a patched version of netgen I don't think it will ever get something like an official release.
sgrogan wrote:I'm not sure if splitting the package is necessary, but maybe we can rename the package netgen6?
I will try to get it renamed to netgen6. In my eyes this is the easiest solution.

btw.: @sgrogan, can you give a link to the scripts which are used to build freecad. Maybe I can help with getting a qt5, py3 build ready...
Last edited by looo on Fri Sep 29, 2017 9:27 am, edited 2 times in total.
User avatar
looo
Posts: 3301
Joined: Mon Nov 11, 2013 5:29 pm

Re: packaging netgen6.2 for ubuntu

Postby looo » Fri Sep 29, 2017 9:21 am

trusty is updated. package is now called netgen6 and is stored in /usr/lib/netgen6.

Headers should be located here:

Code: Select all

-DNETGENDATA=/usr/lib/netgen6/include/netgen \
-DNETGEN_INCLUDEDIR=/usr/lib/netgen6/include/netgen \
-DNGLIB_INCLUDE_DIR=/usr/lib/netgen6/include/netgen/nglib \
Renaming netgen maybe allows to use multiple versions of netgen, but it also introduce troubles for user compilation...