# make a port NO_ARCH=yes with pkgng



## bler (Apr 14, 2014)

I'm creating a port for architecture independent software (actually it is architecture dependent, but it's being handled elsewhere). Port is not ready for an official submission, so far I'm using it to create packages for external distribution.
Everything is fine with old pkg_tools, but PKGNG has a problem with architecture.

The package is created on amd64 system, which is a requirement I cannot overcome. Naturally this makes `pkg add` think that the package is meant for amd64 and complains:

```
pkg: wrong architecture: freebsd:10:x86:64 instead of freebsd:10:x86:32
```
which is true to the point, but in my case irrelevant. 

I did some research and found that pkg doesn't have an option to ignore architecture yet, besides that would be a dirty method of installing a software. There is a NO_ARCH variable in bsd.port.mk that should tell the packaging system that the package is platform independent, but PKGNG is happy to ignore that. Of course I could write some hack to change +MANIFEST after a package is created, but I'd prefer to do it in some civilized way. 

So, is there a way to do that? The package is created by `make package` on FreeBSD10/x64.

Muchas gracias,
ML


----------



## bler (Apr 15, 2014)

It seems that the problem is (temporarily) solved.

I've found a commented out entry in bsd.pkgng.mk:

```
.if defined(NO_ARCH)
    @${ECHO_CMD} "arch: `${PKG_BIN} config abi | ${CUT} -d: -f1,2`:*" >> ${MANIFESTF}
.endif
```

When uncommented, the package is buil*t*, as it should, with a NO_ARCH property. I'd be glad for some insight as to why this entry was commented out and if it breaks anything.


----------

