Bug 241241 - [new port] science/openhantek6022 - OpenHantek6022 v2.15
Summary: [new port] science/openhantek6022 - OpenHantek6022 v2.15
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-14 13:07 UTC by Thomas Spielauer
Modified: 2019-11-05 15:35 UTC (History)
0 users

See Also:


Attachments
Port files (2.65 KB, text/plain)
2019-10-14 13:07 UTC, Thomas Spielauer
no flags Details
Portsfiles (2.20 KB, text/plain)
2019-10-18 08:29 UTC, Thomas Spielauer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Spielauer 2019-10-14 13:07:21 UTC
Created attachment 208302 [details]
Port files

This is a proposal for the ports files (Makefile, distinfo, pkg-descr, pkg-plist) that is capable of compiling and installing OpenHantek6022 v2.15.


A DSO (USB digital storage oscilloscope) software for Hantek USB digital signal oscilloscopes 6022BE/BL and Voltcraft DSO2020.

WWW: https://github.com/OpenHantek/OpenHantek6022
Comment 1 Dmitry Marakasov freebsd_committer 2019-10-14 17:47:17 UTC
- Please don't use += unless necessary (not necessary in this port at all)
- USES=cmake adds dependency on cmake and configure/build/install targets for you, so you don't need to redefined these. Install directories belong to mtree so are also created automatically.
- Please don't display any messages from targets - package users won't see them. Use pkg-message
- This submission needs GIDs entry
- What's the purpose of USES=xorg?
- This doesn't build

===>  Performing out-of-source build
/bin/mkdir -p /wrkdirs/usr/ports/science/openhantek6022/work/.build
-- The C compiler identification is Clang 6.0.1
-- The CXX compiler identification is Clang 6.0.1
-- Check for working C compiler: /usr/local/libexec/ccache/cc
-- Check for working C compiler: /usr/local/libexec/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/libexec/ccache/c++
-- Check for working CXX compiler: /usr/local/libexec/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
  The imported target "Qt5::Core" references the file

     "/usr/local/lib/qt5/bin/qmake"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:6 (_qt5_Core_check_file_exists)
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:178 (include)
  /usr/local/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:93 (find_package)
  /usr/local/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:93 (find_package)
  openhantek/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/wrkdirs/usr/ports/science/openhantek6022/work/.build/CMakeFiles/CMakeOutput.log".
*** Error code 1

Stop.
make: stopped in /usr/ports/science/openhantek6022
build of science/openhantek6022 | openhantek6022-2.15 ended at Mon Oct 14 20:25:22 MSK 2019
build time: 00:00:14
!!! build failure encountered !!!
Comment 2 Thomas Spielauer 2019-10-18 08:29:17 UTC
Created attachment 208399 [details]
Portsfiles

addressing comments from 2019-10-14
Comment 3 Thomas Spielauer 2019-10-18 08:31:55 UTC
Sorry for the inconvenience this is my first try of a contribution to the FreeBSD ports tree. I've tried to address all comments with a new version of the shar, tried a build on a clean system (should work now) and modified the port to not require any GIDs. Just one question (if this is allowed on this bugtracker) - if a port requires a GID should one also propose a patch for /usr/ports/GIDs or is this auto generated from somewhere elese?
Comment 4 Dmitry Marakasov freebsd_committer 2019-10-23 16:05:27 UTC
> Sorry for the inconvenience this is my first try of a contribution to the FreeBSD ports tree.

No probs, I'm happy to explain.

> I've tried to address all comments with a new version of the shar

It's better now, here's the next bunch:

- Please use 2 tabs indentation - it's more common and expected and doesn't waste as much free space, while there's only a single variable that doesn't fit which still doesn't justify third tab
- As mentioned, you don't need BUILD_DEPENDS=cmake because it's added by USES=cmake
- Depending on qmake via BUILD_DEPENDS is incorrect (and in fact breaks the build), you should use USE_QT for all Qt dependencies. Here, you need to add `qmake_build buildtools_build linguisttools_build` to it. Note that most cmake+qt using projects require at least these because these are used in cmake qt detection scripts.
- (side note) you don't need to STRIP binaries installed by INSTALL_PROGRAM, as it already performs stripping as needed
- As mentioned, the framework already provides do-install target which calls upstream installation procedures, and you should generally not override it. Here, it installs the binary and handles stripping
  - However, you can extend it, and here you may install devd config in post-install:. That's the only target code you need

> tried a build on a clean system (should work now)

Please do consider installing poudriere. Even clean system is not capable of catching a lot of port problems.

> and modified the port to not require any GIDs.

Since you still install devd config, so it does require a group.

> Just one question (if this is allowed on this bugtracker) - if a port requires a GID should one also propose a patch for /usr/ports/GIDs or is this auto generated from somewhere elese?

A patch is needed. You can take any free GIDs entry, but it also makes sense to add comment to corresponding UIDs entry and note that the GID is taken, see `grep 'GID used' /usr/ports/UIDs`.
Comment 5 Dmitry Marakasov freebsd_committer 2019-11-05 15:35:51 UTC
Any progress?