{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/neko/issues/84","labels_url":"https://api.github.com/repos/HaxeFoundation/neko/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/neko/issues/84/comments","events_url":"https://api.github.com/repos/HaxeFoundation/neko/issues/84/events","html_url":"https://github.com/HaxeFoundation/neko/issues/84","id":97856753,"number":84,"title":"[Feature request] a FreeBSD port","user":{"login":"ppenzin","id":3345781,"avatar_url":"https://avatars.githubusercontent.com/u/3345781?v=3","gravatar_id":"","url":"https://api.github.com/users/ppenzin","html_url":"https://github.com/ppenzin","followers_url":"https://api.github.com/users/ppenzin/followers","following_url":"https://api.github.com/users/ppenzin/following{/other_user}","gists_url":"https://api.github.com/users/ppenzin/gists{/gist_id}","starred_url":"https://api.github.com/users/ppenzin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppenzin/subscriptions","organizations_url":"https://api.github.com/users/ppenzin/orgs","repos_url":"https://api.github.com/users/ppenzin/repos","events_url":"https://api.github.com/users/ppenzin/events{/privacy}","received_events_url":"https://api.github.com/users/ppenzin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-29T04:30:10Z","updated_at":"2015-09-15T18:30:04Z","closed_at":null,"body":"As discussed, I would like to add Neko to a FreeBSD's Ports Collection. I can find some [traces of a Neko port](http://www.freebsdsoftware.org/lang/neko.html) and it also seems like it was\r\ntaken down.\r\n\r\nI apologize in advance if that is too straightforward to someone, I want to explain what I am trying to do to those not very familiar with the process. Also, feedback is welcome and appreciated!\r\n\r\nInformation on how Ports Collection works can be found in [Porter's\r\nHandbook](https://www.freebsd.org/doc/en/books/porters-handbook/). There is a straight-forward [walkthrough](https://www.freebsd.org/doc/en/books/porters-handbook/) of a simple port at the\r\nbeginning.\r\n\r\nA binary install package is created automatically for every port (not right away though).\r\n\r\n## Port files\r\n\r\nTo do get a port we need four files:\r\n```\r\nMakefile\r\ndistinfo\r\npkg-descr\r\npkg-plist\r\n```\r\n\r\npkg-plist and distinfo can be (and should be) autogenerated, more on that below.\r\n\r\npkg-descr:\r\n```\r\nThe Neko Programming Language\r\n\r\nNeko is a high-level dynamically typed programming language which can\r\nalso be used as an embedded scripting language. It has been designed to\r\nprovide a common runtime for several different languages.\r\n\r\nWWW: http://nekovm.org/\r\n```\r\n\r\nMakefile (with my comments):\r\n```\r\n# $FreeBSD$\r\n\r\n# Port identification information. Version is made up, since the port is not\r\n# pointing to any release yet.\r\n\r\nPORTNAME=       neko\r\nPORTVERSION=    2.0p\r\nCATEGORIES=     lang\r\n\r\n# This can be me, though can put any other email address instead\r\n\r\nMAINTAINER=     petr@somewhere.com\r\n\r\n# A short version of what this port is about\r\n\r\nCOMMENT=        Neko programming languages and virtual machine\r\n\r\n# Self explanatory: license and GC library\r\n\r\nLICENSE=        MIT\r\nLIB_DEPENDS=    libgc-threaded.so:${PORTSDIR}/devel/boehm-gc-threaded\r\n\r\n# Disable make -j\r\n\r\nMAKE_JOBS_UNSAFE=yes\r\n\r\n# Where to get the code from. This points to my own github repo, since I\r\n# needed to make some changes to the code. Will need to use\r\n# official Neko repository. Also, GH_TAGNAME can be a release name.\r\n\r\nUSE_GITHUB=     yes\r\nGH_ACCOUNT=     ppenzin\r\n# GH_PROJECT is the same as port name\r\nGH_TAGNAME=     6138f0808895e54cf998cb644d1f4b255dbf83f4\r\n\r\n# Build and install setting. Pointing INSTALL_PREFIX to where FreeBSD expects,\r\n# setting a target that would produce stripped binaries.\r\n\r\nUSES=           gmake\r\nMAKE_ARGS=      os=freebsd INSTALL_PREFIX=${STAGEDIR}${PREFIX}\r\n# Use default build and install targets (\"all\" and \"install\" respectively)\r\n\r\n# Run a smoke test after installing\r\n\r\npost-install:\r\n        cd ${WRKSRC} && ${MAKE_CMD} ${MAKE_ARGS} test\r\n\r\n\r\n.include <bsd.port.mk>\r\n```\r\n\r\nI would really appreciate any feedback on this. Also, if you are curious or\r\nwant to test my work read below for instructions.\r\n\r\n## Port generation and testing\r\n\r\nFor the curious, to generate the rest of the port on a FreeBSD machine first\r\ngenerate checksum (as root, connected to the internet):\r\n\r\n```\r\n# make makesum\r\n```\r\nThis will download a tarball into distfile directory and create distinfo with a\r\nchecksum. Then get a list of files to add to pkg-plist (root not required):\r\n```\r\n$ make makeplist\r\n...\r\n/you/have/to/check/what/makeplist/gives/you\r\nbin/neko\r\nbin/nekoc\r\nbin/nekoml\r\nbin/nekoml.std\r\nbin/nekotools\r\ninclude/neko.h\r\ninclude/neko_mod.h\r\ninclude/neko_vm.h\r\nlib/libneko.so\r\nlib/neko/mysql5.ndll\r\nlib/neko/regexp.ndll\r\nlib/neko/sqlite.ndll\r\nlib/neko/std.ndll\r\nlib/neko/zlib.ndll\r\n```\r\n\r\nCopy the list of paths at the end of the output to pkg-plist file in the same directory. After that you can proceed to [test it](https://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html) as described in Porter's Handbook.\r\n"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/neko/issues/comments/140491479","html_url":"https://github.com/HaxeFoundation/neko/issues/84#issuecomment-140491479","issue_url":"https://api.github.com/repos/HaxeFoundation/neko/issues/84","id":140491479,"user":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T18:30:04Z","updated_at":"2015-09-15T18:30:04Z","body":"all of the libs here are usually installed as part of neko distrib\r\nhttps://github.com/HaxeFoundation/neko/tree/master/libs (apart \"ui\")\r\nwe have two versions of mysql : \"mysql.ndll\" which statically links libmysqlclient_r.a and \"mysql5.ndll\" which is a full protocol rewrite with no dependency to libmysqlclient, but only handles TCP connection\r\nas for mod_neko/mod_tora, if they compile from source using local apache version it's good. either they require to build several versions for different apache versions"}}