Created attachment 208302 [details]
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.
- 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
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
but not all the files it references.
Call Stack (most recent call first):
-- Configuring incomplete, errors occurred!
See also "/wrkdirs/usr/ports/science/openhantek6022/work/.build/CMakeFiles/CMakeOutput.log".
*** Error code 1
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 !!!
Created attachment 208399 [details]
addressing comments from 2019-10-14
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?
> 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`.