Bug 195754

Summary: [New Port] x11/antimicro: Program for mapping keyboard and mouse to a gamepad
Product: Ports & Packages Reporter: Anton Törnqvist <antont>
Component: Individual Port(s)Assignee: Pawel Pekala <pawel>
Status: Closed FIXED    
Severity: Affects Only Me CC: pawel
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
shar file
none
poudriere-buildlog-10amd64-antimicro
none
new shar
none
shar
none
2.10.1 shar none

Description Anton Törnqvist 2014-12-06 18:51:08 UTC
Created attachment 150277 [details]
shar file
Comment 1 Anton Törnqvist 2014-12-06 18:51:51 UTC
Created attachment 150278 [details]
poudriere-buildlog-10amd64-antimicro
Comment 2 Jan Beich freebsd_committer freebsd_triage 2014-12-17 01:33:22 UTC
Comment on attachment 150277 [details]
shar file

> XCATEGORIES=	games

x11 category maybe better based on number of input simulation tools.

  deskutils/easystroke
  emulators/joytran
  sysutils/bsdmoted
  x11/imwheel
  x11/xdotool
  x11/xstroke

>XGH_COMMIT=	e851802
>XGH_TAGNAME=	${GH_COMMIT}

2.10 is out. And drop GH_TAGNAME if it matches revision of the tag.

>XUSE_GCC=	yes

Define USES=compiler:c++11-lang for recent enough compiler instead.
If the intent is something else a comment maybe appropriate.

The port builds fine here on 9.3R i386 with base g++ 4.2.1.
And having USE_GCC instead of USES=compiler:gcc-c++11-lib
may cause libc++ crashes on 10.0R and later.
Comment 3 Anton Törnqvist 2014-12-17 19:40:48 UTC
Created attachment 150688 [details]
new shar

> x11 category maybe better based on number of input simulation tools.
I agree.

> 2.10 is out. And drop GH_TAGNAME if it matches revision of the tag.
Dropping GH_TAGNAME gives me weird behavior, it creates 2 directories in WRKDIR, one named correctly but is empty and another with faulty name and correct files.

"make install" give this error:
CMake Error: The source directory "/usr/home/anton/ports-dev/ports/antimicro/work/Ryochan7-antimicro-f25d030" does not appear to contain CMakeLists.txt.

And WRKDIR looks like this:

antimicro/work $ ls -l
total 8
drwxr-xr-x  6 root  wheel  512 10 Dec 22:16 Ryochan7-antimicro-098a099
drwxr-xr-x  2 root  wheel  512 17 Dec 22:25 Ryochan7-antimicro-f25d030

antimicro/work/Ryochan7-antimicro-098a099 $ ls -l
total 124
-rw-r--r--  1 root  wheel   3817 10 Dec 22:16 AntiMicro Future Developments.mm
-rw-r--r--  1 root  wheel  22561 10 Dec 22:16 CMakeLists.txt
-rw-r--r--  1 root  wheel  23009 10 Dec 22:16 Changelog
-rw-r--r--  1 root  wheel  11226 10 Dec 22:16 README.md
-rw-r--r--  1 root  wheel   1035 10 Dec 22:16 cmake_uninstall.cmake.in
-rw-r--r--  1 root  wheel  35147 10 Dec 22:16 gpl.txt
drwxr-xr-x  2 root  wheel    512 10 Dec 22:16 other
drwxr-xr-x  3 root  wheel    512 10 Dec 22:16 share
drwxr-xr-x  9 root  wheel   6144 10 Dec 22:16 src
drwxr-xr-x  2 root  wheel    512 10 Dec 22:16 windows

antimicro/work/Ryochan7-antimicro-f25d030 $ ls -l
total 0

With GH_TAGNAME present "make install" doesn't complain and installs the port correctly.

> Define USES=compiler:c++11-lang for recent enough compiler instead.
> If the intent is something else a comment maybe appropriate.
> 
> The port builds fine here on 9.3R i386 with base g++ 4.2.1.
> And having USE_GCC instead of USES=compiler:gcc-c++11-lib
> may cause libc++ crashes on 10.0R and later.
Did not know this, updated this.

Changes for new shar:
- Updated to 2.10
- Changed category to x11
- Replaced USE_GCC with USES=compiler:gcc-c++11-lib
Comment 4 Jan Beich freebsd_committer freebsd_triage 2014-12-17 20:47:18 UTC
(In reply to Anton Törnqvist from comment #3)
> > 2.10 is out. And drop GH_TAGNAME if it matches revision of the tag.
> Dropping GH_TAGNAME gives me weird behavior, it creates 2 directories in
> WRKDIR, one named correctly but is empty and another with faulty name and
> correct files.

GH_COMMIT may not correspond to the tag commit. It's a quirk of legacy archive URL on which USE_GITHUB currently relies.

  $ fetch -o a.tar.gz https://codeload.github.com/Ryochan7/antimicro/legacy.tar.gz/2.10
  $ fetch -o b.tar.gz https://codeload.github.com/Ryochan7/antimicro/legacy.tar.gz/f25d030

vs.

  $ fetch -o c.tar.gz https://github.com/Ryochan7/antimicro/archive/2.10.tar.gz
  $ fetch -o d.tar.gz https://github.com/Ryochan7/antimicro/archive/f25d030.tar.gz

> 
> "make install" give this error:
> CMake Error: The source directory
> "/usr/home/anton/ports-dev/ports/antimicro/work/Ryochan7-antimicro-f25d030"
> does not appear to contain CMakeLists.txt.
> 
> And WRKDIR looks like this:
> 
> antimicro/work $ ls -l
> total 8
> drwxr-xr-x  6 root  wheel  512 10 Dec 22:16 Ryochan7-antimicro-098a099
> drwxr-xr-x  2 root  wheel  512 17 Dec 22:25 Ryochan7-antimicro-f25d030

Define GH_COMMIT=098a099 and you'll have only one. The empty directory is probably created by failing cmake build.
Comment 5 Anton Törnqvist 2014-12-17 21:20:46 UTC
Created attachment 150694 [details]
shar

>GH_COMMIT may not correspond to the tag commit. It's a quirk of legacy archive URL on which USE_GITHUB currently relies.

Thank you for this information, good to be aware of this.

>Define GH_COMMIT=098a099 and you'll have only one. The empty directory is probably created by failing cmake build.

This fixed it. Thanks!
Comment 6 Pawel Pekala freebsd_committer freebsd_triage 2014-12-31 13:02:57 UTC
XUSE_QT5=	linguisttools qmake buildtools gui widgets network

Some of those are build only dependencies should be used with
_build suffix here.


XUSES=	cmake pkgconfig desktop-file-utils shared-mime-info compiler:gcc-c++11-lib

Is insisting on build with newer gcc is really necessary? From my testing
this port builds with default compilers and libraries on all supported
FreeBSD releases. I have only run tested binary compiled with clang
on 11-CURRENT and it seems to run fine.
Comment 7 Anton Törnqvist 2015-01-02 12:10:07 UTC
Created attachment 151210 [details]
2.10.1 shar

-updated to 2.10.1
-removed 
-added _build suffix to qt5 build dependencies.
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-01-02 14:26:15 UTC
A commit references this bug:

Author: pawel
Date: Fri Jan  2 14:25:47 UTC 2015
New revision: 376050
URL: https://svnweb.freebsd.org/changeset/ports/376050

Log:
  AntiMicro is a graphical program used to map keyboard keys and mouse controls
  to a gamepad. This program is useful for playing PC games using a gamepad
  that do not have any form of built-in gamepad support. However,
  you can use this program to control any desktop application with a gamepad;
  this means that your system has to be running an X environment in order to
  run this program.

  WWW: https://github.com/Ryochan7/antimicro

  PR:		195754
  Submitted by:	Anton Tornqvist <antont@inbox.lv>

Changes:
  head/x11/Makefile
  head/x11/antimicro/
  head/x11/antimicro/Makefile
  head/x11/antimicro/distinfo
  head/x11/antimicro/pkg-descr
  head/x11/antimicro/pkg-plist
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-01-02 14:31:17 UTC
A commit references this bug:

Author: pawel
Date: Fri Jan  2 14:30:42 UTC 2015
New revision: 46140
URL: https://svnweb.freebsd.org/changeset/doc/46140

Log:
  For x11/antimicro

  PR:		195754

Changes:
  head/en_US.ISO8859-1/articles/contributors/contrib.additional.xml