[MacPorts] #51737: New port libpointing
#51737: New port libpointing ----------------------------------------------+---------------------------- Reporter: izzatbek@… | Owner: macports- Type: submission | tickets@… Priority: Normal | Status: new Component: ports | Milestone: Keywords: HID, pointing, transfer-function | Version: | Port: libpointing ----------------------------------------------+---------------------------- Libpointing is an open-source cross-platform library written in C++ that provides direct access to HID pointing devices and supports the design of pointing transfer functions. -- Ticket URL: <https://trac.macports.org/ticket/51737> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Changes (by mf2k@…): * cc: izzatbek@… (removed) * keywords: HID, pointing, transfer-function => Comment: Thanks. As reporter, you do not need to Cc yourself. -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by ryandesign@…): Because this downloads from github, you should use the github portgroup. -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by izzatbek@…): Any news? -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Changes (by khindenburg@…): * cc: khindenburg@… (added) Comment: Does this Portfile actually build/install for you? I think it will require a lot of work to get it work -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by izzatbek@…): In fact, this Portfile downloads the archive with a Makefile which can build and install libpointing (I used the same archive for homebrew). We have already released a few versions of libpointing. Normally, it works fine -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by izzatbek@…): Any news? What's wrong with the Portfile? Can you please verify it? -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by g5pw@…): Replying to [comment:6 izzatbek@…]:
Any news? What's wrong with the Portfile? Can you please verify it?
A couple of things are wrong. * we require at least two checksums (current defaults are sha256 and rmd160) * The {{{distname}}} you set is the default one, so that line can be omitted * I see you set {{{use_configure no}}}. You need to be sure that the portfile is UsingTheRightCompiler * I see you specify the github PortGroup, but I don't see a call to {{{github.setup}}}. That's why you had to set up {{{master_sites}}}. Refer to the PortGroup file for usage. -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by izzatbek@…): Thanks for your reply, So, I added rmd160 checksum and removed distname. To use the right compiler can I just use compiler.whitelist or I need to specify differently? In the Makefile (from downloaded archive) I specify g++. I removed github PortGroup, since I do not build from github repo directly, but for the releases output by Travis CI. Waiting from you -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by kenneth.f.cunningham@…): I just took a look at this, on MacOSX Snow Leopard with libc++ installed. After putting the Portfile into my local repository, the initial build went like this: {{{ $ sudo port -v build libpointing ---> Computing dependencies for libpointing. ---> Building libpointing make: Entering directory `/opt/local/var/macports/build/_opt_myports_devel_libpointing/libpointing/work/libpointing-0.9.7' make: *** No rule to make target `all'. Stop. make: Leaving directory `/opt/local/var/macports/build/_opt_myports_devel_libpointing/libpointing/work/libpointing-0.9.7' Command failed: cd "/opt/local/var/macports/build/_opt_myports_devel_libpointing/libpointing/work/libpointing-0.9.7" && /usr/bin/make -j2 -w all }}} Going into the directory directly, I could start the build with "make". But this failed with {{{ $ make g++ -stdlib=libc++ -mmacosx-version-min=10.6 -std=c++11 -Iinclude -DPOINTING_XORG -c -o src/pointing/utils/Base64.o src/pointing/utils/Base64.cpp cc1plus: error: unrecognized command line option "-stdlib=libc++" cc1plus: error: unrecognized command line option "-std=c++11" make: *** [src/pointing/utils/Base64.o] Error 1 }}} Editing the Makefile directly, I changed the compiler to clang++ and the -mmacosx-version-min to 10.6. The build then went better, until: {{{ In file included from src/pointing/input/osx/osxPrivateMultitouchDevice.cpp:16: In file included from include/pointing/input/osx/osxPrivateMultitouchDevice.h:20: include/pointing/input/osx/osxPrivateMultitouchSupport.h:93:40: error: unknown type name 'uuid_t' MTDeviceRef MTDeviceCreateFromGUID(uuid_t *guid) ; // FIXME: doesn't work with MTDeviceGetGUID... }}} and this was fixed with adding the following to pointing/input/osx/osxPrivateMultitouchSupport.h {{{ #include <unistd.h> }}} After that, the build proceeded successfully (using "make"), and the product, was produced. {{{ -rwxr-xr-x 1 root admin 664904 12 Aug 13:00 libpointing.dylib }}} The test produced the following, which I presume to be the correct output? {{{ KensMacBookPro:libpointing-0.9.7 cunningh$ sudo make test clang++ -stdlib=libc++ -Iinclude -DPOINTING_XORG -mmacosx-version-min=10.6 -std=c++11 -o src/simpletest src/simpletest.cpp -Llib -F/System/Library/PrivateFrameworks -mmacosx-version-min=10.6 -framework MultitouchSupport -framework IOKit -framework CoreFoundation -framework ApplicationServices -framework AppKit -lpointing src/simpletest 0.9.7 | system xorg subpixel constant interpolation naive sigmoid composition }}} SO - it seems there is no rule for "make all", the compiler should be clang++, the macos-min-version can be 10.6 if 10.6 has libc++ is installed, and there needs to be a reference to the missing #include in the noted file, at least on this system. I hope this helps! Ken -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by kenneth.f.cunningham@…): Whoops. One more thing to fix. With "sudo make install" everything was installed into /usr/local, instead of the macports directory: {{{ $ sudo make install mkdir -p /usr/local/include cp -r include/pointing /usr/local/include cp -r include/pointing-xorg /usr/local/include cp -r include/pointing-echomouse /usr/local/include mkdir -p /usr/local/lib cp -r lib /usr/local }}} -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Comment (by izzatbek@…): Thanks for the feedback! So, I should use macon-min-version = 10.6. Can't I just restrict it to be 10.7? How can I detect if libc++ is installed? Also, I thought PREFIX in the makefile should install everything correctly in the correct directory. What should I use instead? Thank you in advance, Izzat -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:13> MacPorts <https://www.macports.org/> Ports system for OS X
#51737: New port libpointing --------------------------+-------------------------------- Reporter: izzatbek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------------- Changes (by raimue@…): * cc: raimue@… (added) Comment: You should still use `PortGroup github`, that simplifies the Portfile and you can omit explicit `name`, `version`, and `master_sites`. The `homepage` is just a redirect to GitHub, so I would remove that as well. {{{ PortGroup github 1.0 github.setup INRIA libpointing 1.0.1 v github.tarball_from releases }}} According to the [https://github.com/INRIA/libpointing/blob/master/LICENSE.md LICENSE.md], the license is actually `GPL-2+`. Do not use compiled binaries from Travis. Redistributing compiled binaries is discouraged and the Portfile should compile from source. Our buildbot infrastructure will produce binaries for different releases of OS X. This project seems to be using qmake as build system, so you should add the following port group to the top of the file and remove the wrong statement `use_configure no`: {{{ PortGroup qmake 1.0 }}} -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:14> MacPorts <https://www.macports.org/> Ports system for macOS
#51737: New port libpointing --------------------------+-------------------------- Reporter: izzatbek@… | Owner: ryandesign@… Type: submission | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------- Changes (by ryandesign@…): * status: new => assigned * owner: macports-tickets@… => ryandesign@… -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:15> MacPorts <https://www.macports.org/> Ports system for macOS
#51737: New port libpointing --------------------------+-------------------------- Reporter: izzatbek@… | Owner: ryandesign@… Type: submission | Status: assigned Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: libpointing | --------------------------+-------------------------- Comment (by ryandesign@…): I've spent a little time looking at this now. The source code in GitHub indeed uses QMake as a configuration system. I can download that code and run `qmake && make` and it looks like a bunch of object files get compiled but no Mac library, and `make install` does nothing. But then you have building-and-packaging/mac/prepare which is a Python script that creates a whole different source distribution file for macOS including a new dynamically-generated Makefile which hardcodes the compiler as `g++`; overwrites `CPPFLAGS`, `CXXFLAGS` and `LDFLAGS` so I can't specify them at the command line; doesn't set the library's `install_name` or `compatibility_version` or `current_version` when compiling it; and has an `install` target that doesn't support `DESTDIR` and uses the deprecated `-r` flag of the `cp` command. This distribution file is what you have uploaded to GitHub Releases as libpointing- mac-1.0.1.tar.gz and are using in the Portfile you submitted here. Why have you made it so confusing and convoluted? Why does macOS need a separate distribution file and build system? Why not simply let me download the source code from your repository and run `./configure && make && sudo make install` which so many other projects successfully use? -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:16> MacPorts <https://www.macports.org/> Ports system for macOS
#51737: New port libpointing --------------------------+-------------------------- Reporter: izzatbek@… | Owner: ryandesign@… Type: submission | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: libpointing | --------------------------+-------------------------- Changes (by ryandesign@…): * status: assigned => closed * resolution: => fixed Comment: I've added the port in r152635. You should remove the Portfile you have in your GitHub repository, and remove the Portfiles from your GitHub releases. -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:17> MacPorts <https://www.macports.org/> Ports system for macOS
#51737: New port libpointing --------------------------+-------------------------- Reporter: izzatbek@… | Owner: ryandesign@… Type: submission | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: libpointing | --------------------------+-------------------------- Comment (by izzatbek@…): In fact, the procedure is complicated, since we didn't want to depend on qmake, so created those packaging scripts. And since I do not master building Makefiles, there were such inconsistencies. I saw what you have done. Thanks a lot. Now what happens if I want to update the library? I need to update the Portfile? And possible the patch-file? -- Ticket URL: <https://trac.macports.org/ticket/51737#comment:18> MacPorts <https://www.macports.org/> Ports system for macOS
participants (1)
-
MacPorts